Skip to content

Commit 8bba37b

Browse files
committed
use compatibilityPayload
1 parent 3b80129 commit 8bba37b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,6 @@ const server = createServer(async (request, response) => {
9494
stream: false,
9595
model: "gpt-4o",
9696
messages: toolCallMessages,
97-
stream: false,
98-
model: "gpt-4",
9997
tools: functions.map((f) => f.tool),
10098
});
10199
console.timeEnd("tool-call");
@@ -113,7 +111,7 @@ const server = createServer(async (request, response) => {
113111
const stream = await capiClient.chat.completions.create({
114112
stream: true,
115113
model: "gpt-4o",
116-
messages: payload.messages,
114+
messages: compatibilityPayload.messages,
117115
token: apiKey,
118116
})
119117

@@ -142,7 +140,7 @@ const server = createServer(async (request, response) => {
142140
console.log("\t with args", args);
143141
const func = new funcClass(modelsAPI);
144142
functionCallRes = await func.execute(
145-
payload.messages,
143+
compatibilityPayload.messages,
146144
args
147145
);
148146
} catch (err) {

0 commit comments

Comments
 (0)