types

package
v0.0.0-...-7c2999d Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 1 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 struct {
	Name         string
	Model        string
	Instructions interface{} // Can be either string or a function returning string
	Functions    []AgentFunction
	// openai.ChatCompletionToolChoiceOptionBehaviorNone
	// openai.ChatCompletionToolChoiceOptionBehaviorAuto
	// openai.ChatCompletionToolChoiceOptionBehaviorRequired
	ToolChoice        openai.ChatCompletionToolChoiceOptionUnionParam
	ParallelToolCalls bool
}

Agent represents an agent with various attributes, including name, model, instructions, and functions.

type AgentFunction

type AgentFunction any

AgentFunction is a type alias for functions that return either a string, an Agent, or a map.

type ContextVariables

type ContextVariables map[string]any

func (ContextVariables) Get

func (a ContextVariables) Get(key string, defaultValue any) any

func (ContextVariables) Set

func (a ContextVariables) Set(key string, val any)

type Response

type Response struct {
	Messages []openai.ChatCompletionMessageParamUnion
	Agent    *Agent
}

Response represents the response structure with messages, the agent that generated it, and context variables.

type Result

type Result struct {
	Value string
	Agent *Agent
}

Result encapsulates the return values for an agent function.

Jump to

Keyboard shortcuts

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