agent

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Automata

type Automata[A, B any] struct {
	// contains filtered or unexported fields
}

Generic agent automata

func NewAutomata

func NewAutomata[A, B any](
	llm chatter.Chatter,
	memory thinker.Memory,
	reasoner thinker.Reasoner[B],
	encoder thinker.Encoder[A],
	decoder thinker.Decoder[B],
) *Automata[A, B]

func (*Automata[A, B]) Prompt

func (automata *Automata[A, B]) Prompt(ctx context.Context, input A, opt ...chatter.Opt) (B, error)

type Worker added in v0.0.9

type Worker[A any] struct {
	*Automata[A, thinker.CmdOut]
	// contains filtered or unexported fields
}

The agent tailored for executing prompt driven workflow.

func NewWorker added in v0.0.9

func NewWorker[A any](
	llm chatter.Chatter,
	encoder thinker.Encoder[A],
	registry *command.Registry,
) *Worker[A]

Jump to

Keyboard shortcuts

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