generation

package
v0.0.0-beta Latest Latest
Warning

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

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

Documentation

Overview

Package generation defines optional sampling, output, and thinking budget parameters for LLM requests. Shared between internal/config (agent YAML) and pkg/llm/request (provider calls), following the same cross-boundary pattern as pkg/llm/thinking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generation

type Generation struct {
	Temperature      *float64 `yaml:"temperature"`
	TopP             *float64 `yaml:"top_p"`
	TopK             *int     `yaml:"top_k"`
	FrequencyPenalty *float64 `yaml:"frequency_penalty"`
	PresencePenalty  *float64 `yaml:"presence_penalty"`
	MaxOutputTokens  *int     `yaml:"max_output_tokens"`
	Stop             []string `yaml:"stop"`
	Seed             *int     `yaml:"seed"`
	ThinkBudget      *int     `yaml:"think_budget"`
}

Generation holds optional generation parameters. Nil pointer = "don't send" — the provider uses its server-side default.

func (*Generation) Merge

func (g *Generation) Merge(other *Generation)

Merge applies non-nil fields from other onto g. Used for CLI flag overrides that should layer on top of agent YAML values without replacing fields the CLI didn't set.

Jump to

Keyboard shortcuts

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