feat(web-search): add ollama web search provider support #907

This commit is contained in:
Jhao
2026-04-09 21:20:31 +08:00
committed by lyingbug
parent bfa3341d4a
commit fd18264183
8 changed files with 200 additions and 12 deletions
@@ -76,7 +76,8 @@ func isValidProviderType(provider types.WebSearchProviderType) bool {
case types.WebSearchProviderTypeBing,
types.WebSearchProviderTypeGoogle,
types.WebSearchProviderTypeDuckDuckGo,
types.WebSearchProviderTypeTavily:
types.WebSearchProviderTypeTavily,
types.WebSearchProviderTypeOllama:
return true
default:
return false
@@ -101,6 +102,10 @@ func validateProviderParameters(provider types.WebSearchProviderType, params typ
if params.APIKey == "" {
return fmt.Errorf("API key is required for Tavily provider")
}
case types.WebSearchProviderTypeOllama:
if params.APIKey == "" {
return fmt.Errorf("API key is required for Ollama provider")
}
case types.WebSearchProviderTypeDuckDuckGo:
// No API key required
}