Skip to content

Commit

Permalink
fix: tools call and function call
Browse files Browse the repository at this point in the history
  • Loading branch information
heimoshuiyu committed Dec 14, 2023
1 parent 9a42e27 commit 09d43ed
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/chatgpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,7 @@ class Chat {
if (ts) {
try {
const fcList: any[] = JSON.parse(ts);
body["tools"] = fcList.map((fc) => {
return {
type: "function",
function: fc,
};
});
body["tools"] = fcList;
} catch (e) {
console.log("toolsString parse error");
throw (
Expand Down

0 comments on commit 09d43ed

Please sign in to comment.