agent

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Run(context.Context) error
}

func New

func New(_ context.Context, cfg *Config) Agent

type Config

type Config struct {
	Role                 string
	Goal                 string
	Backstory            string
	Gpt                  gpt.Gpt
	Tool                 []tool.Tool
	MaxIter              int
	MaxRpm               int
	MaxExecutionTime     time.Duration
	Memory               bool
	Cache                bool
	PromptTemplate       string
	ResponseTemplate     string
	RespectContextWindow bool
}

func DefaultConfig

func DefaultConfig() *Config

Jump to

Keyboard shortcuts

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