Documentation
¶
Index ¶
- func ToolToSchema(tool Tool) map[string]interface{}
- type AppendFileTool
- type EditFileTool
- type ExecTool
- func (t *ExecTool) Description() string
- func (t *ExecTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)
- func (t *ExecTool) Name() string
- func (t *ExecTool) Parameters() map[string]interface{}
- func (t *ExecTool) SetAllowPatterns(patterns []string) error
- func (t *ExecTool) SetRestrictToWorkspace(restrict bool)
- func (t *ExecTool) SetTimeout(timeout time.Duration)
- type FunctionCall
- type LLMProvider
- type LLMResponse
- type ListDirTool
- type Message
- type MessageTool
- func (t *MessageTool) Description() string
- func (t *MessageTool) Execute(ctx context.Context, args map[string]interface{}) (string, error)
- func (t *MessageTool) Name() string
- func (t *MessageTool) Parameters() map[string]interface{}
- func (t *MessageTool) SetContext(channel, chatID string)
- func (t *MessageTool) SetSendCallback(callback SendCallback)
- type ReadFileTool
- type SendCallback
- type SpawnTool
- type SubagentManager
- type SubagentTask
- type Tool
- type ToolCall
- type ToolDefinition
- type ToolFunctionDefinition
- type ToolRegistry
- type UsageInfo
- type WebFetchTool
- type WebSearchTool
- type WriteFileTool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToolToSchema ¶
Types ¶
type AppendFileTool ¶
type AppendFileTool struct{}
func NewAppendFileTool ¶
func NewAppendFileTool() *AppendFileTool
func (*AppendFileTool) Description ¶
func (t *AppendFileTool) Description() string
func (*AppendFileTool) Name ¶
func (t *AppendFileTool) Name() string
func (*AppendFileTool) Parameters ¶
func (t *AppendFileTool) Parameters() map[string]interface{}
type EditFileTool ¶
type EditFileTool struct{}
func NewEditFileTool ¶
func NewEditFileTool() *EditFileTool
func (*EditFileTool) Description ¶
func (t *EditFileTool) Description() string
func (*EditFileTool) Name ¶
func (t *EditFileTool) Name() string
func (*EditFileTool) Parameters ¶
func (t *EditFileTool) Parameters() map[string]interface{}
type ExecTool ¶
type ExecTool struct {
// contains filtered or unexported fields
}
func NewExecTool ¶
func (*ExecTool) Description ¶
func (*ExecTool) Parameters ¶
func (*ExecTool) SetAllowPatterns ¶
func (*ExecTool) SetRestrictToWorkspace ¶
func (*ExecTool) SetTimeout ¶
type FunctionCall ¶
type LLMProvider ¶
type LLMProvider interface {
Chat(ctx context.Context, messages []Message, tools []ToolDefinition, model string, options map[string]interface{}) (*LLMResponse, error)
GetDefaultModel() string
}
type LLMResponse ¶
type ListDirTool ¶
type ListDirTool struct{}
func (*ListDirTool) Description ¶
func (t *ListDirTool) Description() string
func (*ListDirTool) Name ¶
func (t *ListDirTool) Name() string
func (*ListDirTool) Parameters ¶
func (t *ListDirTool) Parameters() map[string]interface{}
type MessageTool ¶
type MessageTool struct {
// contains filtered or unexported fields
}
func NewMessageTool ¶
func NewMessageTool() *MessageTool
func (*MessageTool) Description ¶
func (t *MessageTool) Description() string
func (*MessageTool) Name ¶
func (t *MessageTool) Name() string
func (*MessageTool) Parameters ¶
func (t *MessageTool) Parameters() map[string]interface{}
func (*MessageTool) SetContext ¶
func (t *MessageTool) SetContext(channel, chatID string)
func (*MessageTool) SetSendCallback ¶
func (t *MessageTool) SetSendCallback(callback SendCallback)
type ReadFileTool ¶
type ReadFileTool struct{}
func (*ReadFileTool) Description ¶
func (t *ReadFileTool) Description() string
func (*ReadFileTool) Name ¶
func (t *ReadFileTool) Name() string
func (*ReadFileTool) Parameters ¶
func (t *ReadFileTool) Parameters() map[string]interface{}
type SendCallback ¶
type SpawnTool ¶
type SpawnTool struct {
// contains filtered or unexported fields
}
func NewSpawnTool ¶
func NewSpawnTool(manager *SubagentManager) *SpawnTool
func (*SpawnTool) Description ¶
func (*SpawnTool) Parameters ¶
func (*SpawnTool) SetContext ¶
type SubagentManager ¶
type SubagentManager struct {
// contains filtered or unexported fields
}
func NewSubagentManager ¶
func NewSubagentManager(provider LLMProvider, workspace string) *SubagentManager
func (*SubagentManager) GetTask ¶
func (sm *SubagentManager) GetTask(taskID string) (*SubagentTask, bool)
func (*SubagentManager) ListTasks ¶
func (sm *SubagentManager) ListTasks() []*SubagentTask
type SubagentTask ¶
type ToolCall ¶
type ToolCall struct {
ID string `json:"id"`
Type string `json:"type"`
Function *FunctionCall `json:"function,omitempty"`
Name string `json:"name,omitempty"`
Arguments map[string]interface{} `json:"arguments,omitempty"`
}
type ToolDefinition ¶
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
type ToolFunctionDefinition ¶
type ToolRegistry ¶
type ToolRegistry struct {
// contains filtered or unexported fields
}
func NewToolRegistry ¶
func NewToolRegistry() *ToolRegistry
func (*ToolRegistry) GetDefinitions ¶
func (r *ToolRegistry) GetDefinitions() []map[string]interface{}
func (*ToolRegistry) Register ¶
func (r *ToolRegistry) Register(tool Tool)
type WebFetchTool ¶
type WebFetchTool struct {
// contains filtered or unexported fields
}
func NewWebFetchTool ¶
func NewWebFetchTool(maxChars int) *WebFetchTool
func (*WebFetchTool) Description ¶
func (t *WebFetchTool) Description() string
func (*WebFetchTool) Name ¶
func (t *WebFetchTool) Name() string
func (*WebFetchTool) Parameters ¶
func (t *WebFetchTool) Parameters() map[string]interface{}
type WebSearchTool ¶
type WebSearchTool struct {
// contains filtered or unexported fields
}
func NewWebSearchTool ¶
func NewWebSearchTool(apiKey string, maxResults int) *WebSearchTool
func (*WebSearchTool) Description ¶
func (t *WebSearchTool) Description() string
func (*WebSearchTool) Name ¶
func (t *WebSearchTool) Name() string
func (*WebSearchTool) Parameters ¶
func (t *WebSearchTool) Parameters() map[string]interface{}
type WriteFileTool ¶
type WriteFileTool struct{}
func (*WriteFileTool) Description ¶
func (t *WriteFileTool) Description() string
func (*WriteFileTool) Name ¶
func (t *WriteFileTool) Name() string
func (*WriteFileTool) Parameters ¶
func (t *WriteFileTool) Parameters() map[string]interface{}
Click to show internal directories.
Click to hide internal directories.