-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtypes.go
28 lines (24 loc) · 860 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package swarmgo
import (
"github.com/prathyushnallamothu/swarmgo/llm"
)
// Response represents the response from an agent
type Response struct {
Messages []llm.Message
Agent *Agent
ContextVariables map[string]interface{}
ToolResults []ToolResult // Results from tool calls
}
// ToolResult represents the result of a tool call
type ToolResult struct {
ToolName string // Name of the tool that was called
Args interface{} // Arguments passed to the tool
Result Result // Result returned by the tool
}
// Result represents the result of a function execution
type Result struct {
Success bool // Whether the function execution was successful
Data interface{} // Any data returned by the function
Error error // Any error that occurred during execution
Agent *Agent // Active agent
}