From 7fbce1ecd95b4e12ceda0a5b874ec8f3951625f7 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 17 一月 2025 17:58:59 +0800 Subject: [PATCH] WI水务智能助理 --- src/api/ai/chat.ts | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/api/ai/chat.ts b/src/api/ai/chat.ts index 20bcaa5..df775d7 100644 --- a/src/api/ai/chat.ts +++ b/src/api/ai/chat.ts @@ -273,7 +273,24 @@ }, callback ); - +/** + * @description 娴佸紡澶фā鍨嬪璇� + * @param {FormData} params + **/ +export const agentStreamByPost = (params, callback: (chunkRes) => void, extraData: any = {}) => + streamReq( + { + url: `/chat/agent_stream`, + method: 'post', + data: params, + params: {}, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + ...extraData, + }, + callback + ); /** * @summary AI澶фā鍨嬪璇� */ @@ -503,8 +520,7 @@ }, }); - - export const question_stream_reply = (params) => +export const question_stream_reply = (params) => request({ url: `/chat/question_stream_reply`, method: 'post', @@ -512,4 +528,4 @@ headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, - }); \ No newline at end of file + }); -- Gitblit v1.9.3