mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
4.8.10 perf (#2378)
* perf: helpline code * fix: prompt call stream=false response prefix * fix: app chat log auth * perf: new chat i18n * fix: milvus dataset cannot export data * perf: doc intro
This commit is contained in:
@@ -411,6 +411,7 @@ const parseAnswer = (
|
||||
str = str.trim();
|
||||
// 首先,使用正则表达式提取TOOL_ID和TOOL_ARGUMENTS
|
||||
const prefixReg = /^1(:|:)/;
|
||||
const answerPrefixReg = /^0(:|:)/;
|
||||
|
||||
if (prefixReg.test(str)) {
|
||||
const toolString = sliceJsonStr(str);
|
||||
@@ -432,7 +433,7 @@ const parseAnswer = (
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
answer: str
|
||||
answer: str.replace(answerPrefixReg, '')
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user