Documentation
¶
Overview ¶
Package model provides the Model type representing a configured LLM model at runtime. It stores the model name and protocol-specific default options, bridging JSON configuration with runtime domain types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// Name is the model identifier (e.g., "gpt-4o", "claude-3-opus", "llama3.1:8b")
Name string
// Options holds protocol-specific default options.
// Keys are protocols (Chat, Vision, Tools, Embeddings).
// Values are option maps for that protocol (temperature, max_tokens, etc.)
Options map[protocol.Protocol]map[string]any
}
Model represents a configured LLM model at runtime. It stores the model name and protocol-specific default options. This is the domain type used during execution, separate from JSON configuration.
func New ¶
func New(cfg *config.ModelConfig) *Model
New creates a Model from a ModelConfig. Handles conversion from string-keyed configuration to Protocol-keyed runtime model. This bridges the gap between JSON configuration structure and runtime domain type.
Click to show internal directories.
Click to hide internal directories.