Skip to content

Commit 63ab83c

Browse files
authored
Merge pull request #5621 from ConnectAI-E/hotfix/plugin-result
hotfix plugin result is not string #5614
2 parents fbc68fa + 268cf3b commit 63ab83c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/utils/chat.ts

+5
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ export function stream(
223223
)
224224
.then((res) => {
225225
let content = res.data || res?.statusText;
226+
// hotfix #5614
227+
content =
228+
typeof content === "string"
229+
? content
230+
: JSON.stringify(content);
226231
if (res.status >= 300) {
227232
return Promise.reject(content);
228233
}

0 commit comments

Comments
 (0)