Documentation
¶
Index ¶
- type CompactionHook
- type ConversationInstance
- func (ci *ConversationInstance) AddAssistantToolCall(toolCall types.ToolCall)
- func (ci *ConversationInstance) AddMessage(role types.MessageRole, content string)
- func (ci *ConversationInstance) AddToolMessage(toolName, toolCallID, content string)
- func (ci *ConversationInstance) LatestAssistantMessage() (*types.Message, bool)
- func (ci *ConversationInstance) RunConversationEndedHook(ctx context.Context) error
- func (ci *ConversationInstance) RunConversationStartedHook(ctx context.Context) error
- func (ci *ConversationInstance) RunPostContextCompactionHook(ctx context.Context, compactedConversationID uuid.UUID) error
- func (ci *ConversationInstance) RunPostToolUseHook(ctx context.Context, toolCall *types.ToolCall, toolCallResponse string) error
- func (ci *ConversationInstance) RunPreContextCompactionHook(ctx context.Context, compactedConversationID uuid.UUID) error
- func (ci *ConversationInstance) RunPreToolUseHook(ctx context.Context, toolCall *types.ToolCall, toolCallResponse string) error
- type ConversationStateHook
- type HookResult
- type Options
- type Runtime
- func (rt *Runtime) NewConversationInstance(ctx context.Context, conversationID uuid.UUID) (*ConversationInstance, error)
- func (rt *Runtime) NewConversationInstanceFromSpec(ctx context.Context, agentSpecID uuid.UUID, sessionID string, ...) (*ConversationInstance, error)
- func (rt *Runtime) RunConversationInstance(ci *ConversationInstance, prompt string) error
- func (rt *Runtime) SetOpenAIClient() error
- func (rt *Runtime) ValidateModel(ctx context.Context, provider agent.LLMProvider, model string) error
- type ToolUseHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactionHook ¶
type CompactionHook struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
CompactedConversationID string `json:"compacted_conversation_id"`
EventType hook.EventType `json:"event_type"`
AgentName string `json:"agent_name"`
LastResponse string `json:"last_response,omitempty"`
}
type ConversationInstance ¶ added in v0.2.4
type ConversationInstance struct {
*agent.Conversation
// contains filtered or unexported fields
}
func (*ConversationInstance) AddAssistantToolCall ¶ added in v0.2.4
func (ci *ConversationInstance) AddAssistantToolCall(toolCall types.ToolCall)
func (*ConversationInstance) AddMessage ¶ added in v0.2.4
func (ci *ConversationInstance) AddMessage(role types.MessageRole, content string)
func (*ConversationInstance) AddToolMessage ¶ added in v0.2.4
func (ci *ConversationInstance) AddToolMessage(toolName, toolCallID, content string)
func (*ConversationInstance) LatestAssistantMessage ¶ added in v0.2.4
func (ci *ConversationInstance) LatestAssistantMessage() (*types.Message, bool)
func (*ConversationInstance) RunConversationEndedHook ¶ added in v0.2.4
func (ci *ConversationInstance) RunConversationEndedHook(ctx context.Context) error
func (*ConversationInstance) RunConversationStartedHook ¶ added in v0.2.4
func (ci *ConversationInstance) RunConversationStartedHook(ctx context.Context) error
func (*ConversationInstance) RunPostContextCompactionHook ¶ added in v0.2.4
func (*ConversationInstance) RunPostToolUseHook ¶ added in v0.2.4
func (*ConversationInstance) RunPreContextCompactionHook ¶ added in v0.2.4
func (*ConversationInstance) RunPreToolUseHook ¶ added in v0.2.4
type ConversationStateHook ¶
type HookResult ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func New ¶
func New(rootCtx context.Context, ctrl *controller.Controller, sch *scheduler.Scheduler, opts Options) (*Runtime, error)
func (*Runtime) NewConversationInstance ¶ added in v0.2.4
func (*Runtime) NewConversationInstanceFromSpec ¶ added in v0.2.4
func (*Runtime) RunConversationInstance ¶ added in v0.2.4
func (rt *Runtime) RunConversationInstance(ci *ConversationInstance, prompt string) error
func (*Runtime) SetOpenAIClient ¶
func (*Runtime) ValidateModel ¶
type ToolUseHook ¶
type ToolUseHook struct {
ID string `json:"id"`
ConversationID string `json:"conversation_id"`
EventType hook.EventType `json:"event_type"`
AgentName string `json:"agent_name"`
LastResponse string `json:"last_response,omitempty"`
ToolName string `json:"tool_name,omitempty"`
ToolArguments string `json:"tool_arguments,omitempty"`
ToolResponse string `json:"tool_response,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.