Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cat = CatTool{ Name: "cat", Description: "Display the contents of a file. Uses the linux command 'cat'.", Inputs: InputSchema{ Type: "object", Properties: map[string]ParameterObject{ "file": { Type: "string", Description: "The file to display the contents of.", }, "number": { Type: "boolean", Description: "Number all output lines.", }, "showEnds": { Type: "boolean", Description: "Display $ at end of each line.", }, "squeezeBlank": { Type: "boolean", Description: "Suppress repeated empty output lines.", }, }, Required: []string{"file"}, }, }
View Source
var FileTree = FileTreeTool{ Name: "file_tree", Description: "List the filetree of some directory. Uses linux command 'tree'.", Inputs: InputSchema{ Type: "object", Properties: map[string]ParameterObject{ "directory": { Type: "string", Description: "The directory to list the filetree of.", }, "level": { Type: "integer", Description: "The depth of the tree to display.", }, }, Required: []string{"directory"}, }, }
View Source
var FileType = FileTypeTool{ Name: "file_type", Description: "Determine the file type of a given file. Uses the linux command 'file'.", Inputs: InputSchema{ Type: "object", Properties: map[string]ParameterObject{ "file_path": { Type: "string", Description: "The path to the file to analyze.", }, "mime_type": { Type: "boolean", Description: "Whether to display the MIME type of the file.", }, }, Required: []string{"file_path"}, }, }
View Source
var Find = FindTool{ Name: "find", Description: "Search for files in a directory hierarchy. Uses linux command 'find'.", Inputs: InputSchema{ Type: "object", Properties: map[string]ParameterObject{ "directory": { Type: "string", Description: "The directory to start the search from.", }, "name": { Type: "string", Description: "The name pattern to search for.", }, "type": { Type: "string", Description: "The file type to search for (f: regular file, d: directory).", }, "maxdepth": { Type: "integer", Description: "The maximum depth of directories to search.", }, }, Required: []string{"directory"}, }, }
View Source
var LS = LsTool{ Name: "ls", Description: "List the files in a directory. Uses the Linux command 'ls'.", Inputs: InputSchema{ Type: "object", Properties: map[string]ParameterObject{ "directory": { Type: "string", Description: "The directory to list the files of.", }, "all": { Type: "boolean", Description: "Show all files, including hidden files.", }, "long": { Type: "boolean", Description: "Use a long listing format.", }, }, Required: []string{"directory"}, }, }
Functions ¶
func NewValidationError ¶ added in v1.2.7
Types ¶
type AiTool ¶ added in v1.2.7
type AiTool interface { // Call the AI tool with the given Input. Returns output from the tool or an error // if the call returned an error-like. An error-like is either exit code non-zero or // restful response non 2xx. Call(Input) (string, error) // Return the UserFunction, later on used // by text queriers to send to their respective // models UserFunction() UserFunction }
type CatTool ¶ added in v1.2.10
type CatTool UserFunction
func (CatTool) UserFunction ¶ added in v1.2.10
func (c CatTool) UserFunction() UserFunction
type FileTreeTool ¶ added in v1.2.7
type FileTreeTool UserFunction
func (FileTreeTool) UserFunction ¶ added in v1.2.7
func (f FileTreeTool) UserFunction() UserFunction
type FileTypeTool ¶ added in v1.2.10
type FileTypeTool UserFunction
func (FileTypeTool) UserFunction ¶ added in v1.2.10
func (f FileTypeTool) UserFunction() UserFunction
type FindTool ¶ added in v1.2.10
type FindTool UserFunction
func (FindTool) UserFunction ¶ added in v1.2.10
func (f FindTool) UserFunction() UserFunction
type InputSchema ¶ added in v1.2.7
type InputSchema struct { Type string `json:"type"` Properties map[string]ParameterObject `json:"properties"` Required []string `json:"required"` }
type LsTool ¶ added in v1.2.10
type LsTool UserFunction
func (LsTool) UserFunction ¶ added in v1.2.10
func (f LsTool) UserFunction() UserFunction
type ParameterObject ¶ added in v1.2.7
type UserFunction ¶ added in v1.2.7
type UserFunction struct { Name string `json:"name"` Description string `json:"description"` Inputs InputSchema `json:"input_schema"` }
type ValidationError ¶ added in v1.2.7
type ValidationError struct {
// contains filtered or unexported fields
}
func (ValidationError) Error ¶ added in v1.2.7
func (v ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.