Skip to main content

Crate chat_deepseek

Crate chat_deepseek 

Source
Expand description

DeepSeek for chat-rs.

Thin wrapper around chat_completions. DeepSeek serves an OpenAI-compatible /v1/chat/completions endpoint; this crate just presets the base URL and the DEEPSEEK_API_KEY env var.

The DeepSeek V4 series of open-weight models natively emits DSML-tagged (XML-ish) tool calls — <|DSML|tool_calls> / <|DSML|invoke> / <|DSML|parameter>. The hosted API parses that into standard OpenAI-shape tool_calls JSON before returning, so this client does not see DSML on the wire. Local runtimes that load the raw weights (e.g. via chat-mistralrs) need their own DSML parser — that lives in the local-runtime layer, not here.

use chat_deepseek::DeepSeekBuilder;

// DEEPSEEK_API_KEY env var is read automatically.
let client = DeepSeekBuilder::new()
    .with_model("deepseek-v4-pro")
    .build();

Structs§

DeepSeekBuilder
WithModel
WithoutModel

Constants§

DEFAULT_DEEPSEEK_BASE_URL
Default DeepSeek base URL.