Skip to content

Commit

Permalink
Merge pull request #5621 from ConnectAI-E/hotfix/plugin-result
Browse files Browse the repository at this point in the history
hotfix plugin result is not string #5614
  • Loading branch information
lloydzhou authored Oct 10, 2024
2 parents fbc68fa + 268cf3b commit 63ab83c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/utils/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ export function stream(
)
.then((res) => {
let content = res.data || res?.statusText;
// hotfix #5614
content =
typeof content === "string"
? content
: JSON.stringify(content);
if (res.status >= 300) {
return Promise.reject(content);
}
Expand Down

0 comments on commit 63ab83c

Please sign in to comment.