executor

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentExecutor

type AgentExecutor struct {
	Agent *assistant.Assistant
	Tools []tools.Tool
	// contains filtered or unexported fields
}

AgentExecutor is responsible for executing the agent with the provided tools

func NewAgentExecutor

func NewAgentExecutor(agent *assistant.Assistant, opts ...ExecutorOption) *AgentExecutor

NewAgentExecutor creates a new instance of AgentExecutor

func (*AgentExecutor) CheckRunStatus

func (ae *AgentExecutor) CheckRunStatus(threadID, runID string) (string, []assistant.ToolCall, error)

func (*AgentExecutor) HandleToolsExecution

func (ae *AgentExecutor) HandleToolsExecution(threadID, runID string, toolCalls []assistant.ToolCall) error

func (*AgentExecutor) RetrieveThreadMessages

func (ae *AgentExecutor) RetrieveThreadMessages(runID, threadID string) (string, error)

func (*AgentExecutor) Run

func (ae *AgentExecutor) Run(input string) (string, error)

Run executes the agent with the provided input and returns the response

type ExecutorOption

type ExecutorOption func(*AgentExecutor)

func WithTools

func WithTools(tools []tools.Tool) ExecutorOption

Jump to

Keyboard shortcuts

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