deepseek

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an DeepSeek LLM client.

It implements the core.Client interface and provides access to DeepSeek's chat completion API, including GPT-3.5, GPT-4, and other models.

The client handles authentication, retries, error handling, and streaming automatically. It supports all DeepSeek features including tool calling, multimodal inputs, and extended thinking (for o1/o3 models).

func New

func New(config Config) (*Client, error)

New creates a new DeepSeek client

func (*Client) Chat

func (c *Client) Chat(ctx context.Context, messages []core.Message, opts ...core.Option) (*core.Response, error)

Chat performs a non-streaming chat completion

func (*Client) ChatStream

func (c *Client) ChatStream(ctx context.Context, messages []core.Message, opts ...core.Option) (*core.Stream, error)

ChatStream performs a streaming chat completion

type Config

type Config struct {
	base.Config
}

Config defines configuration for the DeepSeek client.

Embed base.Config to inherit common settings like APIKey, Model, Temperature, etc.

Example:

config := deepseek.Config{
    Config: base.Config{
        APIKey:      "sk-...",
        Model:       "gpt-4",
        Temperature: 0.7,
        MaxTokens:   1000,
    },
}
client, err := deepseek.New(config)

Jump to

Keyboard shortcuts

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