removed duplicated parameters
This commit is contained in:
parent
81d5da3a81
commit
198d5f7b7d
3 changed files with 11 additions and 15 deletions
|
|
@ -107,7 +107,7 @@ func registerSharedTools(cfg *config.Config, msgBus *bus.MessageBus, registry *A
|
|||
|
||||
// Vision tool
|
||||
if cfg.Tools.Vision.Enabled {
|
||||
agent.Tools.Register(tools.NewAnalyzeImageTool(cfg.Tools.Vision))
|
||||
agent.Tools.Register(tools.NewAnalyzeImageTool(cfg.Tools.Vision, cfg.WorkspacePath(), cfg.Agents.Defaults.RestrictToWorkspace))
|
||||
}
|
||||
|
||||
// Message tool
|
||||
|
|
|
|||
|
|
@ -316,12 +316,10 @@ type ExecConfig struct {
|
|||
}
|
||||
|
||||
type VisionToolConfig struct {
|
||||
Enabled bool `json:"enabled" env:"PICOCLAW_TOOLS_VISION_ENABLED"`
|
||||
ApiKey string `json:"api_key" env:"PICOCLAW_TOOLS_VISION_API_KEY"`
|
||||
ApiURL string `json:"api_url" env:"PICOCLAW_TOOLS_VISION_API_URL"`
|
||||
Model string `json:"model" env:"PICOCLAW_TOOLS_VISION_MODEL"`
|
||||
Workspace string `json:"workspace" env:"PICOCLAW_TOOLS_VISION_WORKSPACE"`
|
||||
Restrict bool `json:"restrict" env:"PICOCLAW_TOOLS_VISION_RESTRICT"`
|
||||
Enabled bool `json:"enabled" env:"PICOCLAW_TOOLS_VISION_ENABLED"`
|
||||
ApiKey string `json:"api_key" env:"PICOCLAW_TOOLS_VISION_API_KEY"`
|
||||
ApiURL string `json:"api_url" env:"PICOCLAW_TOOLS_VISION_API_URL"`
|
||||
Model string `json:"model" env:"PICOCLAW_TOOLS_VISION_MODEL"`
|
||||
}
|
||||
|
||||
type ToolsConfig struct {
|
||||
|
|
@ -450,11 +448,9 @@ func DefaultConfig() *Config {
|
|||
EnableDenyPatterns: true,
|
||||
},
|
||||
Vision: VisionToolConfig{
|
||||
Enabled: false,
|
||||
ApiURL: "",
|
||||
Model: "gpt-4o-mini",
|
||||
Restrict: true,
|
||||
Workspace: "",
|
||||
Enabled: false,
|
||||
ApiURL: "",
|
||||
Model: "gpt-4o-mini",
|
||||
},
|
||||
},
|
||||
Heartbeat: HeartbeatConfig{
|
||||
|
|
|
|||
|
|
@ -31,10 +31,10 @@ type AnalyzeImageTool struct {
|
|||
restrict bool
|
||||
}
|
||||
|
||||
func NewAnalyzeImageTool(opts config.VisionToolConfig) *AnalyzeImageTool {
|
||||
func NewAnalyzeImageTool(opts config.VisionToolConfig, workspace string, restrict bool) *AnalyzeImageTool {
|
||||
return &AnalyzeImageTool{
|
||||
workspace: opts.Workspace,
|
||||
restrict: opts.Restrict,
|
||||
workspace: workspace,
|
||||
restrict: restrict,
|
||||
apiKey: opts.ApiKey,
|
||||
apiURL: opts.ApiURL,
|
||||
model: opts.Model,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue