Documentation
¶
Overview ¶
Package llmprovider exposes a single Provider interface that every LLM backend in the project must satisfy. It ships a factory (New) that picks the right Eino model implementation for each supported provider type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatModelProvider ¶
type ChatModelProvider interface {
Provider
// ChatModel returns the underlying Eino BaseChatModel.
ChatModel() model.BaseChatModel
}
ChatModelProvider extends Provider with access to the underlying Eino ChatModel for use with ChatModelAgent.
func New ¶
func New(cfg Config) (ChatModelProvider, error)
New builds the appropriate Provider for cfg.ProviderType.
type Config ¶
type Config struct {
ProviderType string
ProviderName string // name of the provider config entry; used by openai-codex to find its pool
ModelName string
BaseURL string // required for llamacpp / ollama; ignored for cloud providers
APIKey string // optional for local providers
Temperature float64 // 0 means the backend default
MaxTokens int // 0 means the backend default
MaxRetries int
Timeout time.Duration
CodexManager *codexauth.Manager // required for openai-codex provider type
ClaudeManager *claudeauth.Manager // required for claude-code provider type
}
Config groups every knob the callers need to set.
Click to show internal directories.
Click to hide internal directories.