Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydzhou committed Aug 30, 2024
1 parent 2214689 commit b2965e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/utils/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ export function stream(
JSON.parse(tool.function.arguments),
),
)
.then((res) => {
const content = JSON.stringify(res.data);
if (res.status >= 300) {
return Promise.reject(content);
}
return content;
})
.then((content) => {
options?.onAfterTool?.({
...tool,
Expand Down

0 comments on commit b2965e1

Please sign in to comment.