deepseek

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package deepseek provides a DeepSeek provider implementation. DeepSeek uses an OpenAI-compatible API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatOptions

type ChatOptions struct {
	// Thinking configures the thinking/reasoning behavior.
	// Default is enabled.
	Thinking *ThinkingConfig `json:"thinking,omitempty"`

	// ReasoningEffort controls the thinking strength for DeepSeek V4
	// reasoning models. Canonical values are "low", "high", and "max".
	// "medium" maps to "high" and "xhigh" maps to "max" with a warning.
	ReasoningEffort string `json:"reasoningEffort,omitempty"`
}

ChatOptions contains provider-specific options for the DeepSeek API. These options match ai-sdk's DeepSeekChatOptions schema. See: ai-sdk/packages/deepseek/src/chat/deepseek-chat-options.ts

DeepSeek uses the OpenAI-compatible transport with model-specific normalization.

type FilesOptions added in v0.1.7

type FilesOptions struct {
	ExpiresAfter *int64 `json:"expiresAfter"`
}

type Options

type Options struct {
	APIKey  string
	BaseURL string
	Headers map[string]string
	// HTTPClient sends language-model requests. Nil uses http.DefaultClient.
	HTTPClient *http.Client
}

Options contains configuration for the DeepSeek provider.

type Provider

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

Provider implements the DeepSeek provider.

func New

func New(opts Options) *Provider

New creates a new DeepSeek provider.

func (*Provider) EmbeddingModel

func (p *Provider) EmbeddingModel(modelID string) model.EmbeddingModel

func (*Provider) Files added in v0.1.7

func (p *Provider) Files() model.Files

func (*Provider) ID

func (p *Provider) ID() string

func (*Provider) ImageModel

func (p *Provider) ImageModel(modelID string) model.ImageModel

func (*Provider) LanguageModel

func (p *Provider) LanguageModel(modelID string) model.LanguageModel

func (*Provider) Model

func (p *Provider) Model(modelID string) stream.Model

func (*Provider) RerankingModel

func (p *Provider) RerankingModel(modelID string) model.RerankingModel

func (*Provider) SpeechModel

func (p *Provider) SpeechModel(modelID string) model.SpeechModel

func (*Provider) TranscriptionModel

func (p *Provider) TranscriptionModel(modelID string) model.TranscriptionModel

type ThinkingConfig

type ThinkingConfig struct {
	// Type can be "enabled" or "disabled". "adaptive" maps to "enabled"
	// with a warning. Default is "enabled". See
	// https://api-docs.deepseek.com/guides/thinking_mode.
	Type string `json:"type,omitempty"`
}

ThinkingConfig configures DeepSeek's thinking behavior.

Jump to

Keyboard shortcuts

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