llm

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 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 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

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

Jump to

Keyboard shortcuts

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