Skip to content

Commit

Permalink
guh
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisfiregamer1 committed Apr 13, 2024
1 parent b12b9a7 commit d187d77
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 164 deletions.
4 changes: 2 additions & 2 deletions bots/chatgpt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function doTools(
res.messages.push(result);
});

const newres = await send("", res.messages, callback, requirements);
const newres = await send(null, res.messages, callback, requirements);

console.log(newres);

Expand Down Expand Up @@ -141,7 +141,7 @@ export async function send(
data: resp.choices[0].message.content,
}, false);
}
resp = await doTools(resp);
resp = await doTools(resp, null, requirements);
resp.choices[0].message.content = resp.choices[0].message.content as string;
}

Expand Down
6 changes: 3 additions & 3 deletions bots/gpt_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function doTools(
res.messages.push(result);
});

const newres = await send("", res.messages, callback, requirements);
const newres = await send(null, res.messages, callback, requirements);

console.log(newres);

Expand Down Expand Up @@ -138,7 +138,7 @@ export async function send(
body: JSON.stringify({
model: "gpt-4-turbo",
messages: messages,
tools
tools,
}),
});

Expand All @@ -159,7 +159,7 @@ export async function send(
data: resp.choices[0].message.content,
}, false);
}
resp = await doTools(resp);
resp = await doTools(resp, null, requirements);
resp.choices[0].message.content = resp.choices[0].message.content as string;
}

Expand Down
151 changes: 0 additions & 151 deletions bots/gpt_4.ts.disabled

This file was deleted.

2 changes: 1 addition & 1 deletion main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type TextContent = {
export type ImageContentPart = {
type: "image_url";
image_url: {
url: string; // URL or base64 encoded image data
url: string;
detail?: string; // Optional, defaults to 'auto'
};
};
Expand Down
Loading

0 comments on commit d187d77

Please sign in to comment.