fix: tools call and function call

This commit is contained in:
2023-12-14 17:35:31 +08:00
parent 9a42e2758c
commit 09d43ed566

View File

@@ -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 (