Documentation
¶
Index ¶
- func RegisterTool(tool Tool)
- type ASTEdit
- type ASTEditResults
- type Chat
- type CreateFile
- type CreateFileResults
- type EditFile
- type EditFileResults
- type File
- type FileInfo
- type FindInWorkspace
- type FindInWorkspaceResult
- type FunctionResult
- type ListFilesInWorkspace
- type ListFilesInWorkspaceResponse
- type Match
- type ReadFile
- type ReadFileResponse
- type RunShellCommand
- type RunShellCommandResults
- type RunTerminalCommand
- type RunTerminalCommandResults
- type Tool
- type Toolbox
- type VerifyCode
- type VerifyCodeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTool ¶
func RegisterTool(tool Tool)
Types ¶
type ASTEdit ¶
type ASTEdit struct { Node string `json:"node"` Action string `json:"action"` Filename string `json:"filename"` }
func (*ASTEdit) BuildFunctionDefinition ¶
func (t *ASTEdit) BuildFunctionDefinition() *llm.FunctionDefinition
type ASTEditResults ¶
type ASTEditResults struct {
Success bool `json:"success"`
}
type CreateFile ¶
func (*CreateFile) BuildFunctionDefinition ¶
func (t *CreateFile) BuildFunctionDefinition() *llm.FunctionDefinition
type CreateFileResults ¶
type CreateFileResults struct {
Success bool `json:"success"`
}
type EditFile ¶
type EditFile struct { ExistingText string `json:"existing_text"` NewText string `json:"new_text"` Filename string `json:"filename"` }
func (*EditFile) BuildFunctionDefinition ¶
func (t *EditFile) BuildFunctionDefinition() *llm.FunctionDefinition
type EditFileResults ¶
type EditFileResults struct {
Success bool `json:"success"`
}
type FindInWorkspace ¶
type FindInWorkspace struct {
FindText string `json:"find_text"`
}
func (*FindInWorkspace) BuildFunctionDefinition ¶
func (t *FindInWorkspace) BuildFunctionDefinition() *llm.FunctionDefinition
type FindInWorkspaceResult ¶
type FunctionResult ¶
type ListFilesInWorkspace ¶
type ListFilesInWorkspace struct {
FindFileName string `json:"find_file_name"`
}
func (*ListFilesInWorkspace) BuildFunctionDefinition ¶
func (t *ListFilesInWorkspace) BuildFunctionDefinition() *llm.FunctionDefinition
type ReadFile ¶
type ReadFile struct {
Filename string `json:"filename"`
}
func (*ReadFile) BuildFunctionDefinition ¶
func (t *ReadFile) BuildFunctionDefinition() *llm.FunctionDefinition
type ReadFileResponse ¶
type ReadFileResponse struct {
Contents string `json:"contents"`
}
type RunShellCommand ¶
type RunShellCommand struct {
Command string `json:"shell_command"`
}
func (*RunShellCommand) BuildFunctionDefinition ¶
func (t *RunShellCommand) BuildFunctionDefinition() *llm.FunctionDefinition
type RunShellCommandResults ¶
type RunTerminalCommand ¶
func (*RunTerminalCommand) BuildFunctionDefinition ¶
func (t *RunTerminalCommand) BuildFunctionDefinition() *llm.FunctionDefinition
type Tool ¶
type Tool interface { BuildFunctionDefinition() *llm.FunctionDefinition Run(ctx context.Context, c *Chat, args map[string]any) (any, error) }
func GetAllTools ¶
func GetAllTools() []Tool
type Toolbox ¶
type Toolbox struct {
// contains filtered or unexported fields
}
func NewToolbox ¶
func (*Toolbox) CallFunction ¶
func (t *Toolbox) CallFunction(ctx context.Context, c *Chat, functionCall llm.FunctionCall) (*FunctionResult, error)
func (*Toolbox) GetFunctionDefinitions ¶
func (t *Toolbox) GetFunctionDefinitions() []*llm.FunctionDefinition
type VerifyCode ¶
type VerifyCode struct {
Filename string `json:"filename"`
}
func (*VerifyCode) BuildFunctionDefinition ¶
func (t *VerifyCode) BuildFunctionDefinition() *llm.FunctionDefinition
type VerifyCodeResponse ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.