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
@@ -0,0 +1,11 @@
-- 000005_add_web_search_config.down.sql
-- Remove web_search_config column from tenants table
BEGIN;
-- Remove web_search_config column
ALTER TABLE tenants
DROP COLUMN IF EXISTS web_search_config;
COMMIT;
@@ -0,0 +1,14 @@
-- 000005_add_web_search_config.up.sql
-- Add web_search_config column to tenants table for web search configuration
BEGIN;
-- Add web_search_config column to tenants table
ALTER TABLE tenants
ADD COLUMN web_search_config JSONB DEFAULT NULL;
-- Add comment
COMMENT ON COLUMN tenants.web_search_config IS 'Web search configuration for the tenant';
COMMIT;