llm

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeepSeekChat   = "deepseek-chat"
	DeepSeekCoder  = "deepseek-coder"
	DeepSeekReason = "deepseek-reasoner"
)

DeepSeekModel predefined DeepSeek model constants

Variables

This section is empty.

Functions

func NewDeepSeekClient

func NewDeepSeekClient(opts DeepSeekOptions) (types.LLMProvider, error)

NewDeepSeekClient creates a new DeepSeek client and returns LLMProvider

func NewOpenAIClient

func NewOpenAIClient(opts OpenAIOptions) (types.LLMProvider, error)

NewOpenAIClient creates a new OpenAI client and returns LLMProvider

func NewVolceClient added in v1.2.2

func NewVolceClient(opts VolceOptions) (types.LLMProvider, error)

NewVolceClient creates a new Volce client and returns LLMProvider

func OpenAIClient

func OpenAIClient(apiKey, model string) (types.LLMProvider, error)

OpenAIClient quickly creates OpenAI client and returns LLMProvider

func OpenAIClientWithBaseURL

func OpenAIClientWithBaseURL(apiKey, baseURL, model string) (types.LLMProvider, error)

OpenAIClientWithBaseURL quickly creates OpenAI client with custom BaseURL

func QuickDeepSeekProvider

func QuickDeepSeekProvider(apiKey, model string) (types.LLMProvider, error)

QuickDeepSeekProvider quickly creates a DeepSeek provider

func VolceClient added in v1.2.2

func VolceClient(apiKey, model string) (types.LLMProvider, error)

VolceClient

func VolceClientWithBaseURL added in v1.2.2

func VolceClientWithBaseURL(apiKey, baseURL, model string) (types.LLMProvider, error)

VolceClientWithBaseURL quickly creates a Volce client with a custom BaseURL

Types

type DeepSeekOptions

type DeepSeekOptions struct {
	APIKey  string
	BaseURL string
	Model   string
}

DeepSeekOptions DeepSeek configuration options

func DefaultDeepSeekOptions

func DefaultDeepSeekOptions() DeepSeekOptions

DefaultDeepSeekOptions default DeepSeek configuration

type OpenAIModel

type OpenAIModel string

OpenAIModel OpenAI model constants

const (
	// GPT-4 models
	GPT4      OpenAIModel = "gpt-4"
	GPT4Turbo OpenAIModel = "gpt-4-turbo"
	GPT4o     OpenAIModel = "gpt-4o"
	GPT4oMini OpenAIModel = "gpt-4o-mini"
	GPT41     OpenAIModel = "gpt-4.1"

	// GPT-3.5 models
	GPT35Turbo OpenAIModel = "gpt-3.5-turbo"

	// Other models
	TextDavinci003 OpenAIModel = "text-davinci-003"
	TextCurie001   OpenAIModel = "text-curie-001"
)

func (OpenAIModel) String

func (m OpenAIModel) String() string

String returns model name as string

type OpenAIOptions

type OpenAIOptions struct {
	APIKey  string
	BaseURL string
	Model   string
	OrgID   string
	APIType string // "openai", "azure"
}

OpenAIOptions OpenAI configuration options

func DefaultOpenAIOptions

func DefaultOpenAIOptions() OpenAIOptions

DefaultOpenAIOptions default OpenAI configuration

type VolceModel added in v1.2.2

type VolceModel string

VolceModel Volce model constants

const (
	DoubaoSeed1    VolceModel = "doubao-seed-1-6-251015"
	DoubaoSeedream VolceModel = "doubao-seedream-4-5-251128"
	DeepSeekV32    VolceModel = "deepseek-v3-2-251201"
	KimiK2         VolceModel = "kimi-k2-250905"
)

func (VolceModel) String added in v1.2.2

func (m VolceModel) String() string

String returns the model name as a string

type VolceOptions added in v1.2.2

type VolceOptions struct {
	APIKey  string
	BaseURL string
	Model   string
}

VolceOptions Volce configuration options

func DefaultVolceOptions added in v1.2.2

func DefaultVolceOptions() VolceOptions

DefaultVolceOptions

Jump to

Keyboard shortcuts

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