mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
Release update (#1580)
* release doc * fix: reg metch * perf: tool call arg * fix: stream update variables * remove status * update prompt * rename embeddong model
This commit is contained in:
@@ -71,7 +71,7 @@ export const replaceRegChars = (text: string) => text.replace(/[.*+?^${}()|[\]\\
|
||||
export const sliceJsonStr = (str: string) => {
|
||||
str = str.replace(/(\\n|\\)/g, '').replace(/ /g, '');
|
||||
|
||||
const jsonRegex = /{[^{}]*}/g;
|
||||
const jsonRegex = /{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*}/g;
|
||||
const matches = str.match(jsonRegex);
|
||||
|
||||
if (!matches) {
|
||||
|
Reference in New Issue
Block a user