mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 20:12:38 +08:00
fix: optimize excluded websites handling in xai provider configuration (#10894)
This commit is contained in:
parent
c7c9e1ee44
commit
13093bb821
@ -78,6 +78,7 @@ export function buildProviderBuiltinWebSearchConfig(
|
||||
}
|
||||
}
|
||||
case 'xai': {
|
||||
const excludeDomains = mapRegexToPatterns(webSearchConfig.excludeDomains)
|
||||
return {
|
||||
xai: {
|
||||
maxSearchResults: webSearchConfig.maxResults,
|
||||
@ -85,7 +86,7 @@ export function buildProviderBuiltinWebSearchConfig(
|
||||
sources: [
|
||||
{
|
||||
type: 'web',
|
||||
excludedWebsites: mapRegexToPatterns(webSearchConfig.excludeDomains)
|
||||
excludedWebsites: excludeDomains.slice(0, Math.min(excludeDomains.length, 5))
|
||||
},
|
||||
{ type: 'news' },
|
||||
{ type: 'x' }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user