Commit 6eea50cc by Liu

feat:提问接口增加参数

parent fb8727df
...@@ -283,15 +283,28 @@ export const Chat: React.FC = () => { ...@@ -283,15 +283,28 @@ export const Chat: React.FC = () => {
fetchUrl = proxy + fetchUrl fetchUrl = proxy + fetchUrl
// 根据 toolId 添加相应的参数
const requestBody: Record<string, any> = {
question,
conversationId: currentIdRef.current,
stream: true,
productCode,
toolId: resolvedToolId,
}
// 提质增效:toolId 为 6712395743241
if (resolvedToolId === '6712395743241') {
requestBody.busiType = '01'
requestBody.recordType = 'B00'
}
// 数据助手:toolId 为 6712395743240
else if (resolvedToolId === '6712395743240') {
requestBody.busiType = '01'
}
fetchStreamResponse( fetchStreamResponse(
fetchUrl, fetchUrl,
{ requestBody,
question,
conversationId: currentIdRef.current,
stream: true,
productCode,
toolId: resolvedToolId,
},
(msg) => { (msg) => {
// 检查是否已被取消 // 检查是否已被取消
if (abortControllerRef.current?.signal.aborted) { if (abortControllerRef.current?.signal.aborted) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment