Documentation
¶
Index ¶
- func EncodeImageToBase64(imagePath string) (string, error)
- func NewMemoryTool(name, description string, configuration map[string]string, logger *zap.Logger) entities.Tool
- type BashArgs
- type BashResponse
- type BashTool
- func (t *BashTool) Configuration() map[string]string
- func (t *BashTool) Description() string
- func (t *BashTool) Execute(arguments string) (string, error)
- func (t *BashTool) FullDescription() string
- func (t *BashTool) Name() string
- func (t *BashTool) Parameters() []entities.Parameter
- func (t *BashTool) UpdateConfiguration(config map[string]string)
- type BrowserTool
- func (b *BrowserTool) Configuration() map[string]string
- func (b *BrowserTool) Description() string
- func (b *BrowserTool) Execute(arguments string) (string, error)
- func (b *BrowserTool) FullDescription() string
- func (b *BrowserTool) Name() string
- func (b *BrowserTool) Parameters() []entities.Parameter
- func (b *BrowserTool) UpdateConfiguration(config map[string]string)
- type DirectoryTool
- func (t *DirectoryTool) Configuration() map[string]string
- func (t *DirectoryTool) Description() string
- func (t *DirectoryTool) Execute(arguments string) (string, error)
- func (t *DirectoryTool) FullDescription() string
- func (t *DirectoryTool) Name() string
- func (t *DirectoryTool) Parameters() []entities.Parameter
- func (t *DirectoryTool) UpdateConfiguration(config map[string]string)
- type Entity
- type FetchTool
- func (t *FetchTool) Configuration() map[string]string
- func (f *FetchTool) Description() string
- func (t *FetchTool) Execute(arguments string) (string, error)
- func (t *FetchTool) FullDescription() string
- func (f *FetchTool) Name() string
- func (t *FetchTool) Parameters() []entities.Parameter
- func (t *FetchTool) UpdateConfiguration(config map[string]string)
- type FileReadTool
- func (t *FileReadTool) Configuration() map[string]string
- func (t *FileReadTool) Description() string
- func (t *FileReadTool) Execute(arguments string) (string, error)
- func (t *FileReadTool) FullDescription() string
- func (t *FileReadTool) Name() string
- func (t *FileReadTool) Parameters() []entities.Parameter
- func (t *FileReadTool) UpdateConfiguration(config map[string]string)
- type FileSearchTool
- func (t *FileSearchTool) Configuration() map[string]string
- func (t *FileSearchTool) Description() string
- func (t *FileSearchTool) Execute(arguments string) (string, error)
- func (t *FileSearchTool) FullDescription() string
- func (t *FileSearchTool) Name() string
- func (t *FileSearchTool) Parameters() []entities.Parameter
- func (t *FileSearchTool) UpdateConfiguration(config map[string]string)
- type FileWriteTool
- func (t *FileWriteTool) Configuration() map[string]string
- func (t *FileWriteTool) Description() string
- func (t *FileWriteTool) Execute(arguments string) (string, error)
- func (t *FileWriteTool) FullDescription() string
- func (t *FileWriteTool) Name() string
- func (t *FileWriteTool) Parameters() []entities.Parameter
- func (t *FileWriteTool) UpdateConfiguration(config map[string]string)
- type ImageTool
- func (t *ImageTool) Configuration() map[string]string
- func (t *ImageTool) Description() string
- func (t *ImageTool) Execute(arguments string) (string, error)
- func (t *ImageTool) FullDescription() string
- func (t *ImageTool) Name() string
- func (t *ImageTool) Parameters() []entities.Parameter
- func (t *ImageTool) UpdateConfiguration(config map[string]string)
- type KnowledgeGraph
- type LineResult
- type MCPClient
- type MCPTool
- func (t *MCPTool) Configuration() map[string]string
- func (t *MCPTool) Description() string
- func (t *MCPTool) Execute(arguments string) (string, error)
- func (t *MCPTool) FullDescription() string
- func (t *MCPTool) Name() string
- func (t *MCPTool) Parameters() []entities.Parameter
- func (t *MCPTool) StartMCPClient() error
- func (t *MCPTool) UpdateConfiguration(config map[string]string)
- type MemoryTool
- func (t *MemoryTool) Configuration() map[string]string
- func (t *MemoryTool) Description() string
- func (t *MemoryTool) Execute(arguments string) (string, error)
- func (t *MemoryTool) FullDescription() string
- func (t *MemoryTool) Name() string
- func (t *MemoryTool) Parameters() []entities.Parameter
- func (t *MemoryTool) UpdateConfiguration(config map[string]string)
- type Message
- type MessageContent
- type ProcessArgs
- type ProcessResponse
- type ProcessTool
- func (t *ProcessTool) Configuration() map[string]string
- func (t *ProcessTool) Description() string
- func (t *ProcessTool) Execute(arguments string) (string, error)
- func (t *ProcessTool) FullDescription() string
- func (t *ProcessTool) Name() string
- func (t *ProcessTool) Parameters() []entities.Parameter
- func (t *ProcessTool) UpdateConfiguration(config map[string]string)
- type ProjectTool
- func (t *ProjectTool) Configuration() map[string]string
- func (t *ProjectTool) Description() string
- func (t *ProjectTool) Execute(arguments string) (string, error)
- func (t *ProjectTool) FullDescription() string
- func (t *ProjectTool) Name() string
- func (t *ProjectTool) Parameters() []entities.Parameter
- func (t *ProjectTool) UpdateConfiguration(config map[string]string)
- type Relation
- type RequestBody
- type SwaggerEndpoint
- type SwaggerResponse
- type SwaggerTool
- func (t *SwaggerTool) Configuration() map[string]string
- func (t *SwaggerTool) Description() string
- func (t *SwaggerTool) Execute(arguments string) (string, error)
- func (t *SwaggerTool) FullDescription() string
- func (t *SwaggerTool) Name() string
- func (t *SwaggerTool) Parameters() []entities.Parameter
- func (t *SwaggerTool) UpdateConfiguration(config map[string]string)
- type ToolFactory
- type ToolFactoryEntry
- type TreeEntry
- type VisionTool
- func (v *VisionTool) Configuration() map[string]string
- func (v *VisionTool) Description() string
- func (v *VisionTool) Execute(arguments string) (string, error)
- func (v *VisionTool) FullDescription() string
- func (v *VisionTool) Name() string
- func (v *VisionTool) Parameters() []entities.Parameter
- func (v *VisionTool) UpdateConfiguration(config map[string]string)
- func (v *VisionTool) VisionAPIRequest(messages []Message) (string, error)
- type WebSearchTool
- func (t *WebSearchTool) Configuration() map[string]string
- func (t *WebSearchTool) Description() string
- func (t *WebSearchTool) Execute(arguments string) (string, error)
- func (t *WebSearchTool) FullDescription() string
- func (t *WebSearchTool) Name() string
- func (t *WebSearchTool) Parameters() []entities.Parameter
- func (t *WebSearchTool) UpdateConfiguration(config map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeImageToBase64 ¶
Example function to encode an image to base64
Types ¶
type BashArgs ¶
type BashArgs struct {
Command string `json:"command"`
Background bool `json:"background"`
Timeout int `json:"timeout"`
Env []string `json:"env"`
PID int `json:"pid"`
Action string `json:"action"`
}
BashArgs defines the structure of the arguments for bash execution
type BashResponse ¶
type BashTool ¶
type BashTool struct {
// contains filtered or unexported fields
}
func NewBashTool ¶
func (*BashTool) Configuration ¶
func (*BashTool) Description ¶
func (*BashTool) FullDescription ¶
func (*BashTool) Parameters ¶
func (*BashTool) UpdateConfiguration ¶
type BrowserTool ¶
type BrowserTool struct {
// contains filtered or unexported fields
}
func NewBrowserTool ¶
func (*BrowserTool) Configuration ¶
func (b *BrowserTool) Configuration() map[string]string
func (*BrowserTool) Description ¶
func (b *BrowserTool) Description() string
func (*BrowserTool) FullDescription ¶
func (b *BrowserTool) FullDescription() string
func (*BrowserTool) Name ¶
func (b *BrowserTool) Name() string
func (*BrowserTool) Parameters ¶
func (b *BrowserTool) Parameters() []entities.Parameter
func (*BrowserTool) UpdateConfiguration ¶
func (b *BrowserTool) UpdateConfiguration(config map[string]string)
type DirectoryTool ¶
type DirectoryTool struct {
// contains filtered or unexported fields
}
func NewDirectoryTool ¶
func (*DirectoryTool) Configuration ¶
func (t *DirectoryTool) Configuration() map[string]string
func (*DirectoryTool) Description ¶
func (t *DirectoryTool) Description() string
func (*DirectoryTool) FullDescription ¶
func (t *DirectoryTool) FullDescription() string
func (*DirectoryTool) Name ¶
func (t *DirectoryTool) Name() string
func (*DirectoryTool) Parameters ¶
func (t *DirectoryTool) Parameters() []entities.Parameter
func (*DirectoryTool) UpdateConfiguration ¶
func (t *DirectoryTool) UpdateConfiguration(config map[string]string)
type Entity ¶
type Entity struct {
Name string `json:"name" bson:"name"`
EntityType string `json:"entityType" bson:"entityType"`
Observations []string `json:"observations" bson:"observations"`
}
Entity represents a node in the knowledge graph
type FetchTool ¶
type FetchTool struct {
// contains filtered or unexported fields
}
func NewFetchTool ¶
func (*FetchTool) Configuration ¶
func (*FetchTool) Description ¶
func (*FetchTool) FullDescription ¶
func (*FetchTool) Parameters ¶
func (*FetchTool) UpdateConfiguration ¶
type FileReadTool ¶
type FileReadTool struct {
// contains filtered or unexported fields
}
func NewFileReadTool ¶
func (*FileReadTool) Configuration ¶
func (t *FileReadTool) Configuration() map[string]string
func (*FileReadTool) Description ¶
func (t *FileReadTool) Description() string
func (*FileReadTool) FullDescription ¶
func (t *FileReadTool) FullDescription() string
func (*FileReadTool) Name ¶
func (t *FileReadTool) Name() string
func (*FileReadTool) Parameters ¶
func (t *FileReadTool) Parameters() []entities.Parameter
func (*FileReadTool) UpdateConfiguration ¶
func (t *FileReadTool) UpdateConfiguration(config map[string]string)
type FileSearchTool ¶
type FileSearchTool struct {
// contains filtered or unexported fields
}
func NewFileSearchTool ¶
func (*FileSearchTool) Configuration ¶
func (t *FileSearchTool) Configuration() map[string]string
func (*FileSearchTool) Description ¶
func (t *FileSearchTool) Description() string
func (*FileSearchTool) FullDescription ¶
func (t *FileSearchTool) FullDescription() string
func (*FileSearchTool) Name ¶
func (t *FileSearchTool) Name() string
func (*FileSearchTool) Parameters ¶
func (t *FileSearchTool) Parameters() []entities.Parameter
func (*FileSearchTool) UpdateConfiguration ¶
func (t *FileSearchTool) UpdateConfiguration(config map[string]string)
type FileWriteTool ¶
type FileWriteTool struct {
// contains filtered or unexported fields
}
func NewFileWriteTool ¶
func (*FileWriteTool) Configuration ¶
func (t *FileWriteTool) Configuration() map[string]string
func (*FileWriteTool) Description ¶
func (t *FileWriteTool) Description() string
func (*FileWriteTool) FullDescription ¶
func (t *FileWriteTool) FullDescription() string
func (*FileWriteTool) Name ¶
func (t *FileWriteTool) Name() string
func (*FileWriteTool) Parameters ¶
func (t *FileWriteTool) Parameters() []entities.Parameter
func (*FileWriteTool) UpdateConfiguration ¶
func (t *FileWriteTool) UpdateConfiguration(config map[string]string)
type ImageTool ¶
type ImageTool struct {
// contains filtered or unexported fields
}
func NewImageTool ¶
func (*ImageTool) Configuration ¶
func (*ImageTool) Description ¶
func (*ImageTool) FullDescription ¶
func (*ImageTool) Parameters ¶
func (*ImageTool) UpdateConfiguration ¶
type KnowledgeGraph ¶
type KnowledgeGraph struct {
Entities []Entity `bson:"entities"`
Relations []Relation `bson:"relations"`
}
KnowledgeGraph represents the structure stored in MongoDB
type LineResult ¶
type MCPClient ¶
type MCPClient struct {
// contains filtered or unexported fields
}
type MCPTool ¶
type MCPTool struct {
// contains filtered or unexported fields
}
MCPTool implements the Tool interface for dynamic MCP-based tools.
func NewMCPTool ¶
func NewMCPTool(name, description string, configuration map[string]string, logger *zap.Logger) *MCPTool
NewMCPTool creates a new MCPTool instance. It expects ToolData to have a "mcp_command" in Configuration.
func (*MCPTool) Configuration ¶
func (*MCPTool) Description ¶
func (*MCPTool) FullDescription ¶
func (*MCPTool) Parameters ¶
func (*MCPTool) StartMCPClient ¶
func (*MCPTool) UpdateConfiguration ¶
type MemoryTool ¶
type MemoryTool struct {
// contains filtered or unexported fields
}
func (*MemoryTool) Configuration ¶
func (t *MemoryTool) Configuration() map[string]string
func (*MemoryTool) Description ¶
func (t *MemoryTool) Description() string
func (*MemoryTool) FullDescription ¶
func (t *MemoryTool) FullDescription() string
func (*MemoryTool) Name ¶
func (t *MemoryTool) Name() string
func (*MemoryTool) Parameters ¶
func (t *MemoryTool) Parameters() []entities.Parameter
func (*MemoryTool) UpdateConfiguration ¶
func (t *MemoryTool) UpdateConfiguration(config map[string]string)
type Message ¶
type Message struct {
Role string `json:"role"`
Content []MessageContent `json:"content"`
}
type MessageContent ¶
type ProcessArgs ¶
type ProcessResponse ¶
type ProcessTool ¶
type ProcessTool struct {
// contains filtered or unexported fields
}
func NewProcessTool ¶
func (*ProcessTool) Configuration ¶
func (t *ProcessTool) Configuration() map[string]string
func (*ProcessTool) Description ¶
func (t *ProcessTool) Description() string
func (*ProcessTool) FullDescription ¶
func (t *ProcessTool) FullDescription() string
func (*ProcessTool) Name ¶
func (t *ProcessTool) Name() string
func (*ProcessTool) Parameters ¶
func (t *ProcessTool) Parameters() []entities.Parameter
func (*ProcessTool) UpdateConfiguration ¶
func (t *ProcessTool) UpdateConfiguration(config map[string]string)
type ProjectTool ¶
type ProjectTool struct {
// contains filtered or unexported fields
}
func NewProjectTool ¶
func (*ProjectTool) Configuration ¶
func (t *ProjectTool) Configuration() map[string]string
func (*ProjectTool) Description ¶
func (t *ProjectTool) Description() string
func (*ProjectTool) FullDescription ¶
func (t *ProjectTool) FullDescription() string
func (*ProjectTool) Name ¶
func (t *ProjectTool) Name() string
func (*ProjectTool) Parameters ¶
func (t *ProjectTool) Parameters() []entities.Parameter
func (*ProjectTool) UpdateConfiguration ¶
func (t *ProjectTool) UpdateConfiguration(config map[string]string)
type Relation ¶
type Relation struct {
From string `json:"from" bson:"from"`
To string `json:"to" bson:"to"`
RelationType string `json:"relationType" bson:"relationType"`
}
Relation represents an edge between entities
type RequestBody ¶
type SwaggerEndpoint ¶
type SwaggerResponse ¶
type SwaggerResponse struct {
Endpoints []SwaggerEndpoint `json:"endpoints"`
RawSpec string `json:"raw_spec,omitempty"`
}
type SwaggerTool ¶
type SwaggerTool struct {
// contains filtered or unexported fields
}
func NewSwaggerTool ¶
func (*SwaggerTool) Configuration ¶
func (t *SwaggerTool) Configuration() map[string]string
func (*SwaggerTool) Description ¶
func (t *SwaggerTool) Description() string
func (*SwaggerTool) FullDescription ¶
func (t *SwaggerTool) FullDescription() string
func (*SwaggerTool) Name ¶
func (t *SwaggerTool) Name() string
func (*SwaggerTool) Parameters ¶
func (t *SwaggerTool) Parameters() []entities.Parameter
func (*SwaggerTool) UpdateConfiguration ¶
func (t *SwaggerTool) UpdateConfiguration(config map[string]string)
type ToolFactory ¶
type ToolFactory struct {
// contains filtered or unexported fields
}
func NewToolFactory ¶
func NewToolFactory() (*ToolFactory, error)
func (*ToolFactory) GetFactoryByName ¶
func (t *ToolFactory) GetFactoryByName(name string) (*ToolFactoryEntry, error)
func (*ToolFactory) ListFactories ¶
func (t *ToolFactory) ListFactories() ([]*ToolFactoryEntry, error)
type ToolFactoryEntry ¶
type VisionTool ¶
type VisionTool struct {
NameField string
DescriptionField string
FullDescriptionField string
ConfigurationField map[string]string
}
func (*VisionTool) Configuration ¶
func (v *VisionTool) Configuration() map[string]string
func (*VisionTool) Description ¶
func (v *VisionTool) Description() string
func (*VisionTool) FullDescription ¶
func (v *VisionTool) FullDescription() string
func (*VisionTool) Name ¶
func (v *VisionTool) Name() string
func (*VisionTool) Parameters ¶
func (v *VisionTool) Parameters() []entities.Parameter
func (*VisionTool) UpdateConfiguration ¶
func (v *VisionTool) UpdateConfiguration(config map[string]string)
func (*VisionTool) VisionAPIRequest ¶
func (v *VisionTool) VisionAPIRequest(messages []Message) (string, error)
type WebSearchTool ¶
type WebSearchTool struct {
// contains filtered or unexported fields
}
WebSearchTool represents a tool for searching using the Tavily API.
func NewWebSearchTool ¶
func NewWebSearchTool(name, description string, configuration map[string]string, logger *zap.Logger) *WebSearchTool
NewWebSearchTool creates a new instance of WebSearchTool.
func (*WebSearchTool) Configuration ¶
func (t *WebSearchTool) Configuration() map[string]string
func (*WebSearchTool) Description ¶
func (t *WebSearchTool) Description() string
func (*WebSearchTool) Execute ¶
func (t *WebSearchTool) Execute(arguments string) (string, error)
Execute performs the search and returns both the answer and results.
func (*WebSearchTool) FullDescription ¶
func (t *WebSearchTool) FullDescription() string
func (*WebSearchTool) Name ¶
func (t *WebSearchTool) Name() string
func (*WebSearchTool) Parameters ¶
func (t *WebSearchTool) Parameters() []entities.Parameter
func (*WebSearchTool) UpdateConfiguration ¶
func (t *WebSearchTool) UpdateConfiguration(config map[string]string)
Click to show internal directories.
Click to hide internal directories.