Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assembler ¶
Assembler orchestrates provider and budget components.
func (Assembler) Assemble ¶
func (a Assembler) Assemble(input string) []model.ChatMessage
Assemble builds final messages from input through provider and budget.
func (Assembler) AssembleWithTools ¶
AssembleWithTools builds messages and applies budgeting with tool schema overhead.
type Budget ¶
type Budget struct {
ModelName string
}
Budget enforces token limits on message history.
func (Budget) Apply ¶
func (b Budget) Apply(msgs []model.ChatMessage) []model.ChatMessage
Apply trims messages to fit within the model's context window budget.
func (Budget) ApplyWithTools ¶
func (b Budget) ApplyWithTools(msgs []model.ChatMessage, specs []model.ToolSpec) []model.ChatMessage
ApplyWithTools trims messages accounting for tool schema token overhead. If specs is nil it behaves like the legacy Apply.
Click to show internal directories.
Click to hide internal directories.