feat(web-search): add baidu web search provider support #907
This commit is contained in:
@@ -77,7 +77,8 @@ func isValidProviderType(provider types.WebSearchProviderType) bool {
|
||||
types.WebSearchProviderTypeGoogle,
|
||||
types.WebSearchProviderTypeDuckDuckGo,
|
||||
types.WebSearchProviderTypeTavily,
|
||||
types.WebSearchProviderTypeOllama:
|
||||
types.WebSearchProviderTypeOllama,
|
||||
types.WebSearchProviderTypeBaidu:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
@@ -106,6 +107,10 @@ func validateProviderParameters(provider types.WebSearchProviderType, params typ
|
||||
if params.APIKey == "" {
|
||||
return fmt.Errorf("API key is required for Ollama provider")
|
||||
}
|
||||
case types.WebSearchProviderTypeBaidu:
|
||||
if params.APIKey == "" {
|
||||
return fmt.Errorf("API key is required for Baidu provider")
|
||||
}
|
||||
case types.WebSearchProviderTypeDuckDuckGo:
|
||||
// No API key required
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user