Skip to content

Commit

Permalink
use compatibilityPayload
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 10, 2024
1 parent 3b80129 commit 8bba37b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ const server = createServer(async (request, response) => {
stream: false,
model: "gpt-4o",
messages: toolCallMessages,
stream: false,
model: "gpt-4",
tools: functions.map((f) => f.tool),
});
console.timeEnd("tool-call");
Expand All @@ -113,7 +111,7 @@ const server = createServer(async (request, response) => {
const stream = await capiClient.chat.completions.create({
stream: true,
model: "gpt-4o",
messages: payload.messages,
messages: compatibilityPayload.messages,
token: apiKey,
})

Expand Down Expand Up @@ -142,7 +140,7 @@ const server = createServer(async (request, response) => {
console.log("\t with args", args);
const func = new funcClass(modelsAPI);
functionCallRes = await func.execute(
payload.messages,
compatibilityPayload.messages,
args
);
} catch (err) {
Expand Down

0 comments on commit 8bba37b

Please sign in to comment.