perf: response store

This commit is contained in:
archer
2023-07-23 21:04:57 +08:00
parent ba965320d5
commit 1ffe1be562
20 changed files with 227 additions and 145 deletions

View File

@@ -454,7 +454,7 @@ const ChatTest = ({ appId }: { appId: string }) => {
const history = messages.slice(-historyMaxLen - 2, -2);
// 流请求,获取数据
const { responseText } = await streamFetch({
const { responseText, responseData } = await streamFetch({
url: '/api/chat/chatTest',
data: {
history,
@@ -468,7 +468,7 @@ const ChatTest = ({ appId }: { appId: string }) => {
abortSignal: controller
});
return { responseText };
return { responseText, responseData };
},
[modules, appId, appDetail.name]
);