llm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 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)
	MaxTokens        int      // Maximum number of tokens to generate
	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
}

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"
	Content string
}

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