4.8.10 test (#2568)

* perf: i18n perf

* fix: detail=fasle response

* fix: dataset tag load repeat

* feat :doc

* perf: rename fun

* code comment
This commit is contained in:
Archer
2024-08-29 14:51:34 +08:00
committed by GitHub
parent a177a302d4
commit 322ca757af
18 changed files with 230 additions and 224 deletions

View File

@@ -368,6 +368,14 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
if (assistantResponses.length === 0) return '';
if (assistantResponses.length === 1 && assistantResponses[0].text?.content)
return assistantResponses[0].text?.content;
if (!detail) {
return assistantResponses
.map((item) => item?.text?.content)
.filter(Boolean)
.join('\n');
}
return assistantResponses;
})();