agent

package
v0.0.0-...-56f62b1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 8 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 {
	ID() string
	Configure(config map[string]interface{}) error
	AddTool(tool core.Tool)
	ProcessMessage(ctx context.Context, msg core.Message) ([]core.Message, error)
}

Agent is the interface that all agents must implement

func NewOpenAIAgent

func NewOpenAIAgent(id string, apiKey string, logger *zap.Logger) Agent

type OpenAIAgent

type OpenAIAgent struct {
	// contains filtered or unexported fields
}

func (*OpenAIAgent) AddTool

func (a *OpenAIAgent) AddTool(tool core.Tool)

func (*OpenAIAgent) Configure

func (a *OpenAIAgent) Configure(config map[string]interface{}) error

func (*OpenAIAgent) ID

func (a *OpenAIAgent) ID() string

func (*OpenAIAgent) ProcessMessage

func (a *OpenAIAgent) ProcessMessage(ctx context.Context, msg core.Message) ([]core.Message, error)

Jump to

Keyboard shortcuts

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