Help us shape the future of Go! Take the 2026 Go Developer Survey

llm

package
v0.234.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTokenBudgetExhausted = errors.New("token budget exhausted")

ErrTokenBudgetExhausted marks a model that spent max_tokens before answering.

Functions

func Call

func Call(ctx context.Context, client sdk.Client, model, prompt string, maxTokens int) (string, *sdk.CompletionUsage, error)

Call runs one no-tools completion: a single user message in, the trimmed assistant text out. Same shape as the judge and the conversation summarizer (direct client call, SkipMCP, bounded max_tokens). The caller owns the timeout via ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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