Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultMaxTurns = 100 DefaultToolTimeout = 10 * time.Minute )
Variables ¶
View Source
var ErrMaxTurnsExceeded = errors.New("agent: max turns exceeded")
Functions ¶
This section is empty.
Types ¶
type Compaction ¶ added in v0.6.2
type Config ¶
type Config struct {
Model func() string
Effort func() string
Tools func() []tool.Tool
Instructions func() string
ContextMessages func() []Message
Hooks hook.Hooks
// Zero applies the default. Negative disables.
MaxTurns int
ToolTimeout time.Duration
// contains filtered or unexported fields
}
func DefaultConfig ¶
type Content ¶
type Content struct {
Text string `json:"text,omitempty"`
Refusal string `json:"refusal,omitempty"`
File *File `json:"file,omitempty"`
Reasoning *Reasoning `json:"reasoning,omitempty"`
Compaction *Compaction `json:"compaction,omitempty"`
ToolCall *ToolCall `json:"tool_call,omitempty"`
ToolResult *ToolResult `json:"tool_result,omitempty"`
}
type Message ¶
type Message struct {
Role MessageRole `json:"role"`
Content []Content `json:"content"`
Hidden bool `json:"hidden,omitempty"`
}
type MessageRole ¶
type MessageRole string
const ( RoleUser MessageRole = "user" RoleAssistant MessageRole = "assistant" RoleSystem MessageRole = "system" )
type ToolResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.