AI配置模块功能完善

This commit is contained in:
2025-10-30 15:12:07 +08:00
parent 8b6e3d0815
commit 9ddc6887ff
7 changed files with 6 additions and 784 deletions
@@ -1074,7 +1074,7 @@ const initTestData = (config: AiConfig) => {
testRequest.headers = JSON.stringify(headers, null, 2)
// 构建请求体 - 基于Coze API格式
// 构建请求体 - 完全按照AiChatServiceImpl.buildCozeRequest的格式
const requestBody: any = {
bot_id: config.botId || '',
user_id: 'test_user_' + Date.now(),
@@ -1086,11 +1086,12 @@ const initTestData = (config: AiConfig) => {
content_type: 'text',
type: 'question'
}
]
],
parameters: {}
}
// 如果有workflow_id,添加到请求体
if (config.workflowId) {
if (config.workflowId && config.workflowId.trim()) {
requestBody.workflow_id = config.workflowId
}