Documentation
¶
Index ¶
- type Agent
- type AgentFunction
- type InstructionFunc
- type Orchestrator
- func (c *Orchestrator) Run(agent Agent, messages []llm.Message, contextVars map[string]interface{}) (Response, error)
- func (c *Orchestrator) RunStream(agent Agent, messages []llm.Message, contextVars map[string]interface{}, ...) (Response, error)
- func (c *Orchestrator) RunWithTools(agent Agent, messages []llm.Message, contextVars map[string]interface{}, ...) (Response, error)
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { Name string `json:"name"` Model string `json:"model"` OllamaUrl string `json:"ollama_url"` Instructions interface{} `json:"instructions"` // Can be string or function returning string Functions map[string]AgentFunction `json:"functions"` //ToolChoice *string `json:"tool_choice,omitempty"` //ParallelToolCalls bool `json:"parallel_tool_calls"` Options llm.Options }
Agent represents an AI agent with its configuration
func (*Agent) GetInstructions ¶
GetInstructions returns the current instructions as a string, using the provided context variables
func (*Agent) SetInstructions ¶
SetInstructions sets the instructions for the agent
type AgentFunction ¶
type AgentFunction func(interface{}) (interface{}, error)
type InstructionFunc ¶
InstructionFunc represents a function that takes context variables and returns a string
type Orchestrator ¶
type Orchestrator struct { }
Orchestrator represents an API client for running agents
func (*Orchestrator) Run ¶
func (c *Orchestrator) Run(agent Agent, messages []llm.Message, contextVars map[string]interface{}) (Response, error)
Run executes the agent with the given messages and context variables
type Response ¶
type Response struct { Messages []llm.Message `json:"messages"` Agent Agent `json:"agent,omitempty"` ContextVariables map[string]interface{} `json:"context_variables"` }
Response represents the response from running an agent
func (*Response) GetLastMessage ¶
Function to get the last message of Response.Messages
Click to show internal directories.
Click to hide internal directories.