AI配置增加字段适配处理

This commit is contained in:
2025-12-23 16:51:53 +08:00
parent 2d033e6a3e
commit 7f89fd17d3
22 changed files with 2951 additions and 4 deletions
+15
View File
@@ -933,6 +933,11 @@ CREATE TABLE t_ai_config (
api_token VARCHAR(1000) NOT NULL COMMENT 'API访问令牌 (加密存储)',
api_version VARCHAR(20) COMMENT 'API版本',
-- OAuth认证配置
client_id VARCHAR(200) COMMENT '客户端ID (OAuth认证)',
client_secret VARCHAR(500) COMMENT '客户端密钥 (OAuth认证,加密存储)',
grant_type VARCHAR(50) COMMENT '授权类型: client_credentials, authorization_code, password等',
-- 模型配置
model_name VARCHAR(100) COMMENT '模型名称',
bot_id VARCHAR(100) COMMENT 'Bot ID (Coze专用)',
@@ -1017,6 +1022,7 @@ CREATE INDEX idx_ai_config_type_enabled ON t_ai_config (config_type, is_enabled)
INSERT INTO t_ai_config (
id, config_name, config_key, config_type, provider,
api_base_url, api_token, api_version,
client_id, client_secret, grant_type,
bot_id, workflow_id,
timeout_ms, retry_count, retry_delay_ms, max_tokens, temperature,
support_stream, support_function_call, support_vision, support_file_upload,
@@ -1034,6 +1040,7 @@ INSERT INTO t_ai_config (
'https://api.coze.cn',
'sat_WgqusMh5gTfgRhsEFycGA5n9NailrJYV1rHeruJCHNB1gAvJz4laprLsvK8i2jEL',
'v3',
NULL, NULL, NULL,
'7523042446285439016',
'7523047462895796287',
30000, 3, 1000, 4000, 0.7,
@@ -1050,6 +1057,7 @@ INSERT INTO t_ai_config (
INSERT INTO t_ai_config (
id, config_name, config_key, config_type, provider,
api_base_url, api_token, api_version,
client_id, client_secret, grant_type,
bot_id, workflow_id,
timeout_ms, retry_count, retry_delay_ms, max_tokens, temperature,
support_stream, support_function_call, support_vision, support_file_upload,
@@ -1067,6 +1075,7 @@ INSERT INTO t_ai_config (
'https://api.coze.cn',
'sat_WgqusMh5gTfgRhsEFycGA5n9NailrJYV1rHeruJCHNB1gAvJz4laprLsvK8i2jEL',
'v3',
NULL, NULL, NULL,
'7529062814150295595',
'7523047462895796287',
30000, 3, 1000, 8000, 0.3,
@@ -1083,6 +1092,7 @@ INSERT INTO t_ai_config (
INSERT INTO t_ai_config (
id, config_name, config_key, config_type, provider,
api_base_url, api_token, api_version,
client_id, client_secret, grant_type,
bot_id, workflow_id,
timeout_ms, retry_count, retry_delay_ms, max_tokens, temperature,
support_stream, support_function_call, support_vision, support_file_upload,
@@ -1100,6 +1110,7 @@ INSERT INTO t_ai_config (
'https://api.coze.cn',
'sat_WgqusMh5gTfgRhsEFycGA5n9NailrJYV1rHeruJCHNB1gAvJz4laprLsvK8i2jEL',
'v3',
NULL, NULL, NULL,
'7529062814150295595', -- 复用总结bot,或配置专门的情绪分析bot
'7523047462895796287', -- 复用总结workflow,或配置专门的情绪分析workflow
45000, 3, 1500, 6000, 0.2,
@@ -1116,6 +1127,7 @@ INSERT INTO t_ai_config (
INSERT INTO t_ai_config (
id, config_name, config_key, config_type, provider,
api_base_url, api_token, api_version,
client_id, client_secret, grant_type,
model_name,
timeout_ms, retry_count, retry_delay_ms, max_tokens, temperature, top_p,
support_stream, support_function_call, support_vision, support_file_upload,
@@ -1133,6 +1145,7 @@ INSERT INTO t_ai_config (
'https://api.openai.com/v1',
'sk-placeholder-openai-api-key-here', -- 需要配置实际的OpenAI API Key
'v1',
NULL, NULL, NULL,
'gpt-4-turbo-preview',
30000, 3, 2000, 4000, 0.7, 1.0,
1, 1, 1, 1,
@@ -1148,6 +1161,7 @@ INSERT INTO t_ai_config (
INSERT INTO t_ai_config (
id, config_name, config_key, config_type, provider,
api_base_url, api_token, api_version,
client_id, client_secret, grant_type,
bot_id, workflow_id,
timeout_ms, retry_count, retry_delay_ms, max_tokens, temperature,
support_stream, support_function_call, support_vision, support_file_upload,
@@ -1165,6 +1179,7 @@ INSERT INTO t_ai_config (
'https://api.coze.cn',
'sat_WgqusMh5gTfgRhsEFycGA5n9NailrJYV1rHeruJCHNB1gAvJz4laprLsvK8i2jEL', -- 开发环境可使用相同token或配置专门的开发token
'v3',
NULL, NULL, NULL,
'7523042446285439016', -- 开发环境可使用相同bot-id或配置专门的开发bot-id
'7523047462895796287', -- 开发环境可使用相同workflow-id或配置专门的开发workflow-id
10000, 2, 500, 2000, 0.8,