From 9c8ee8b0d726413c21db87e2e8ff86da1620c32b Mon Sep 17 00:00:00 2001 From: Theodora Cheng Date: Mon, 9 Sep 2024 13:04:16 -0500 Subject: [PATCH 1/2] update to gpt-4o --- src/functions.ts | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/functions.ts b/src/functions.ts index d60c7a4..7badced 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -3,7 +3,7 @@ import { ModelsAPI } from "./models-api.js"; // defaultModel is the model used for internal calls - for tool calling, // or just for chat completions. -export const defaultModel = "gpt-4o-mini"; +export const defaultModel = "gpt-4o"; // RunnerResponse is the response from a function call. export interface RunnerResponse { diff --git a/src/index.ts b/src/index.ts index 3a3e2a4..44ad1ad 100644 --- a/src/index.ts +++ b/src/index.ts @@ -90,7 +90,7 @@ const server = createServer(async (request, response) => { console.time("tool-call"); const toolCaller = await capiClient.chat.completions.create({ stream: false, - model: "gpt-4", + model: "gpt-4o", messages: toolCallMessages, tool_choice: "auto", tools: functions.map((f) => f.tool), @@ -107,7 +107,7 @@ const server = createServer(async (request, response) => { // No tool to call, so just call the model with the original messages const stream = await capiClient.chat.completions.create({ stream: true, - model: "gpt-4", + model: "gpt-4o", // @ts-expect-error - TODO @gr2m - type incompatibility between @openai/api and @copilot-extensions/preview-sdk messages: payload.messages, }); From 2f42d1edb42ce1cf1c71fbb30c05de9877adfa43 Mon Sep 17 00:00:00 2001 From: Theodora Cheng Date: Mon, 9 Sep 2024 13:13:56 -0500 Subject: [PATCH 2/2] leave default model at 4o-mini --- src/functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions.ts b/src/functions.ts index 7badced..d60c7a4 100644 --- a/src/functions.ts +++ b/src/functions.ts @@ -3,7 +3,7 @@ import { ModelsAPI } from "./models-api.js"; // defaultModel is the model used for internal calls - for tool calling, // or just for chat completions. -export const defaultModel = "gpt-4o"; +export const defaultModel = "gpt-4o-mini"; // RunnerResponse is the response from a function call. export interface RunnerResponse {