Documentation
¶
Index ¶
- Constants
- func BuildSystemPrompt(systemMD, globalMD, localMD, systemPrefix string) string
- type AgentSession
- func (s *AgentSession) AncestryMessages(turnID string) []message.Message
- func (s *AgentSession) ContextTokens() int
- func (s *AgentSession) ContextWindow() int
- func (s *AgentSession) Model() string
- func (s *AgentSession) Prompt(ctx context.Context, userText string) (<-chan Event, error)
- func (s *AgentSession) RestoreMessages(turnID string) ([]message.Message, map[string][]message.Message)
- func (s *AgentSession) Sess() *session.Session
- func (s *AgentSession) SetSubagents(defs map[string]*SubagentDef)
- func (s *AgentSession) SwitchTo(turnID string)
- func (s *AgentSession) SystemPrompt() string
- func (s *AgentSession) ToolDefs() []message.ToolDef
- func (s *AgentSession) TurnIndex() []session.TurnMeta
- type Event
- type SubagentDef
Constants ¶
View Source
const ToolRulesPrompt = `` /* 224-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func BuildSystemPrompt ¶
Types ¶
type AgentSession ¶
type AgentSession struct {
// contains filtered or unexported fields
}
func NewAgentSession ¶
func (*AgentSession) AncestryMessages ¶
func (s *AgentSession) AncestryMessages(turnID string) []message.Message
func (*AgentSession) ContextTokens ¶
func (s *AgentSession) ContextTokens() int
func (*AgentSession) ContextWindow ¶
func (s *AgentSession) ContextWindow() int
func (*AgentSession) Model ¶
func (s *AgentSession) Model() string
func (*AgentSession) RestoreMessages ¶
func (*AgentSession) Sess ¶
func (s *AgentSession) Sess() *session.Session
func (*AgentSession) SetSubagents ¶
func (s *AgentSession) SetSubagents(defs map[string]*SubagentDef)
func (*AgentSession) SwitchTo ¶
func (s *AgentSession) SwitchTo(turnID string)
func (*AgentSession) SystemPrompt ¶
func (s *AgentSession) SystemPrompt() string
func (*AgentSession) ToolDefs ¶
func (s *AgentSession) ToolDefs() []message.ToolDef
func (*AgentSession) TurnIndex ¶
func (s *AgentSession) TurnIndex() []session.TurnMeta
type Event ¶
type Event struct {
Type string `json:"type"`
Delta string `json:"delta,omitempty"`
ToolCallID string `json:"toolCallId,omitempty"`
ToolCallName string `json:"toolCallName,omitempty"`
ToolCallArgs string `json:"toolCallArgs,omitempty"`
ToolResult string `json:"toolResult,omitempty"`
ToolError string `json:"toolError,omitempty"`
ToolDuration string `json:"toolDuration,omitempty"`
Error string `json:"error,omitempty"`
FinishReason string `json:"finishReason,omitempty"`
Usage *provider.Usage `json:"usage,omitempty"`
Subagent string `json:"subagent,omitempty"`
SubagentID string `json:"subagentId,omitempty"`
}
type SubagentDef ¶
Click to show internal directories.
Click to hide internal directories.