agent

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result[T any] struct {
	Prompts  []prompt.Prompt
	Result   T
	Metadata models.Metadata
	Depth    int
}

func Run

func Run[T any](maxDepth int, g *gen.Generator, prompts ...prompt.Prompt) (*Result[T], error)

Run will prompt until the llm responds with no tool calls, or until maxDepth is reached. Unless Output is already set, it will be set by using schema.From on the expected result struct. Does not work with gemini as of 2025-02-17.

Jump to

Keyboard shortcuts

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