feat: Add web search functionality and enhance agent mode integration

- Introduced web search configuration in config.yaml, allowing multiple providers with specific settings.
- Updated InputField component to manage agent mode and web search toggles, improving user interaction.
- Enhanced chat API to include web search status in requests, enabling dynamic query handling.
- Implemented backend support for web search integration, merging results with knowledge base queries.
- Added tenant-level web search configuration management, allowing customization per tenant.
This commit is contained in:
wizardchen
2025-11-10 03:14:12 +08:00
parent 1313f4dfbb
commit 07a8c1de4c
46 changed files with 2574 additions and 56 deletions
+4
View File
@@ -269,6 +269,9 @@ const sendMsg = async (value, modelId = '') => {
// Get agent mode status from settings store
const agentEnabled = useSettingsStoreInstance.isAgentEnabled;
// Get web search status from settings store
const webSearchEnabled = useSettingsStoreInstance.isWebSearchEnabled;
// Get knowledge_base_ids from settings store (selected by user via KnowledgeBaseSelector)
const kbIds = useSettingsStoreInstance.settings.selectedKnowledgeBases || [];
@@ -294,6 +297,7 @@ const sendMsg = async (value, modelId = '') => {
session_id: session_id.value,
knowledge_base_ids: kbIds,
agent_enabled: agentEnabled,
web_search_enabled: webSearchEnabled,
summary_model_id: modelId,
mcp_service_ids: mcpServiceIds,
query: value,