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
|
// Vision tool
|
||||||
if cfg.Tools.Vision.Enabled {
|
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
|
// Message tool
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,6 @@ type VisionToolConfig struct {
|
||||||
ApiKey string `json:"api_key" env:"PICOCLAW_TOOLS_VISION_API_KEY"`
|
ApiKey string `json:"api_key" env:"PICOCLAW_TOOLS_VISION_API_KEY"`
|
||||||
ApiURL string `json:"api_url" env:"PICOCLAW_TOOLS_VISION_API_URL"`
|
ApiURL string `json:"api_url" env:"PICOCLAW_TOOLS_VISION_API_URL"`
|
||||||
Model string `json:"model" env:"PICOCLAW_TOOLS_VISION_MODEL"`
|
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"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ToolsConfig struct {
|
type ToolsConfig struct {
|
||||||
|
|
@ -453,8 +451,6 @@ func DefaultConfig() *Config {
|
||||||
Enabled: false,
|
Enabled: false,
|
||||||
ApiURL: "",
|
ApiURL: "",
|
||||||
Model: "gpt-4o-mini",
|
Model: "gpt-4o-mini",
|
||||||
Restrict: true,
|
|
||||||
Workspace: "",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Heartbeat: HeartbeatConfig{
|
Heartbeat: HeartbeatConfig{
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,10 @@ type AnalyzeImageTool struct {
|
||||||
restrict bool
|
restrict bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewAnalyzeImageTool(opts config.VisionToolConfig) *AnalyzeImageTool {
|
func NewAnalyzeImageTool(opts config.VisionToolConfig, workspace string, restrict bool) *AnalyzeImageTool {
|
||||||
return &AnalyzeImageTool{
|
return &AnalyzeImageTool{
|
||||||
workspace: opts.Workspace,
|
workspace: workspace,
|
||||||
restrict: opts.Restrict,
|
restrict: restrict,
|
||||||
apiKey: opts.ApiKey,
|
apiKey: opts.ApiKey,
|
||||||
apiURL: opts.ApiURL,
|
apiURL: opts.ApiURL,
|
||||||
model: opts.Model,
|
model: opts.Model,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue