model

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

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