deepseek

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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