Switched to DDG
This commit is contained in:
@@ -19,12 +19,11 @@ type Client struct {
|
||||
client *openai.Client
|
||||
model string
|
||||
contextSize int
|
||||
searxngURL string
|
||||
mcpManager *mcp.Manager
|
||||
}
|
||||
|
||||
// NewClient creates a new LLM client
|
||||
func NewClient(apiURL, apiKey, model string, contextSize int, searxngURL string, mcpManager *mcp.Manager) *Client {
|
||||
func NewClient(apiURL, apiKey, model string, contextSize int, mcpManager *mcp.Manager) *Client {
|
||||
config := openai.DefaultConfig(apiKey)
|
||||
config.BaseURL = apiURL
|
||||
|
||||
@@ -34,7 +33,6 @@ func NewClient(apiURL, apiKey, model string, contextSize int, searxngURL string,
|
||||
client: client,
|
||||
model: model,
|
||||
contextSize: contextSize,
|
||||
searxngURL: searxngURL,
|
||||
mcpManager: mcpManager,
|
||||
}
|
||||
}
|
||||
@@ -230,7 +228,7 @@ func (c *Client) handleToolCall(ctx context.Context, toolCall openai.ToolCall) s
|
||||
return fmt.Sprintf("Error parsing arguments: %v", err)
|
||||
}
|
||||
fmt.Printf("Searching: %s\n", args.Query)
|
||||
result, err := tools.WebSearch(c.searxngURL, args.Query)
|
||||
result, err := tools.WebSearch(args.Query)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("Search error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user