Documentation
¶
Overview ¶
Package deepseek implements the Provider interface against DeepSeek's OpenAI-compatible Chat Completions API. It reuses the openai-go SDK pointed at DeepSeek's base URL — no new dependency. Structured output is prompt-driven (no response_format): DeepSeek's strict json_schema support is uneven, so JSON shape comes from the system prompt's contract plus the retry-once-then-degrade pipeline (ADR-0014 §4), the same way Ollama works.
Index ¶
- Constants
- func IsModelSupported(model string) bool
- func Models() []string
- func New(cfg config.ProviderConfig) (provider.Provider, error)
- type Client
- func (c *Client) ContextWindow(model string) int
- func (c *Client) DefaultModel() string
- func (c *Client) EstimateTokens(s string) int
- func (c *Client) Name() string
- func (c *Client) Pricing(model string) provider.Pricing
- func (c *Client) Review(ctx context.Context, req provider.Request) (provider.Response, error)
- func (c *Client) TestConnection(ctx context.Context) error
Constants ¶
View Source
const ( Name = "deepseek" ModelChat = "deepseek-chat" ModelReasoner = "deepseek-reasoner" DefaultModel = ModelChat )
Variables ¶
This section is empty.
Functions ¶
func IsModelSupported ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ContextWindow ¶
func (*Client) DefaultModel ¶
func (*Client) EstimateTokens ¶
Click to show internal directories.
Click to hide internal directories.