deepseek

package
v0.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package deepseek provides an interfaces.LLMClient for DeepSeek.

DeepSeek exposes an OpenAI-compatible Chat Completions API, so this client uses the openai-go SDK as its transport but implements the interface independently: it defaults to DeepSeek's base URL, sends system prompts with the "system" role (DeepSeek does not accept OpenAI's "developer" role), and maps the deepseek-reasoner "reasoning_content" field into LLMResponse.Metadata["reasoning_content"] and streaming ThinkingDelta.

Common models: "deepseek-chat" and "deepseek-reasoner".

Index

Constants

View Source
const DefaultBaseURL = "https://api.deepseek.com"

DefaultBaseURL is DeepSeek's OpenAI-compatible API endpoint.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	llm.LLMConfig
	// contains filtered or unexported fields
}

Client implements interfaces.LLMClient for DeepSeek.

func NewClient

func NewClient(opts ...llm.Option) (*Client, error)

NewClient creates a new DeepSeek LLM client. The base URL defaults to DefaultBaseURL; a caller-supplied llm.WithBaseURL overrides it.

func (*Client) Generate

func (*Client) GenerateStream

func (c *Client) GenerateStream(ctx context.Context, req *interfaces.LLMRequest) (interfaces.LLMStream, error)

func (*Client) GetModel

func (c *Client) GetModel() string

func (*Client) GetProvider

func (c *Client) GetProvider() interfaces.LLMProvider

func (*Client) IsStreamSupported

func (c *Client) IsStreamSupported() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL