mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 06:49:02 +08:00
feat: conditionally enable web search plugin based on configuration
- Updated the logic to add the `webSearchPlugin` only if `middlewareConfig.enableWebSearch` is true. - Added comments to clarify the use of default search parameters and configuration options.
This commit is contained in:
parent
4573e3f48f
commit
3c955e69f1
@ -143,7 +143,10 @@ export default class ModernAiProvider {
|
|||||||
const plugins: AiPlugin[] = []
|
const plugins: AiPlugin[] = []
|
||||||
// 1. 总是添加通用插件
|
// 1. 总是添加通用插件
|
||||||
// plugins.push(textPlugin)
|
// plugins.push(textPlugin)
|
||||||
plugins.push(webSearchPlugin())
|
if (middlewareConfig.enableWebSearch) {
|
||||||
|
// 内置了默认搜索参数,如果改的话可以传config进去
|
||||||
|
plugins.push(webSearchPlugin())
|
||||||
|
}
|
||||||
|
|
||||||
// 2. 推理模型时添加推理插件
|
// 2. 推理模型时添加推理插件
|
||||||
if (middlewareConfig.enableReasoning) {
|
if (middlewareConfig.enableReasoning) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user