fix: tools call and function call
This commit is contained in:
@@ -231,12 +231,7 @@ class Chat {
|
|||||||
if (ts) {
|
if (ts) {
|
||||||
try {
|
try {
|
||||||
const fcList: any[] = JSON.parse(ts);
|
const fcList: any[] = JSON.parse(ts);
|
||||||
body["tools"] = fcList.map((fc) => {
|
body["tools"] = fcList;
|
||||||
return {
|
|
||||||
type: "function",
|
|
||||||
function: fc,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("toolsString parse error");
|
console.log("toolsString parse error");
|
||||||
throw (
|
throw (
|
||||||
|
|||||||
Reference in New Issue
Block a user