llm

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateParams

type GenerateParams struct {
	Temperature      float64  // Controls randomness (0.0 to 1.0)
	TopP             float64  // Alternative to temperature for nucleus sampling
	FrequencyPenalty float64  // Penalize frequent tokens (-2.0 to 2.0)
	PresencePenalty  float64  // Penalize tokens already present (-2.0 to 2.0)
	StopSequences    []string // Stop generation at these sequences
	TopK             int      // Limit vocabulary to top K tokens
	RepeatPenalty    float64  // Penalize token repetition
	Reasoning        string   // Reasoning mode for Claude models (none, minimal, comprehensive)
}

GenerateParams contains parameters for text generation

func DefaultGenerateParams

func DefaultGenerateParams() *GenerateParams

DefaultGenerateParams returns default generation parameters

type Message

type Message struct {
	Role       string // "system", "user", "assistant", "tool"
	Content    string
	ToolCallID string // ID of the tool call this message is responding to (for tool messages)
}

Message represents a message in a chat conversation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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