Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 18, 2024
2 parents 92883d1 + 1280383 commit f048295
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,12 @@ export const KnowledgeCutOffDate: Record<string, string> = {
"gpt-4o": "2023-10",
"gpt-4o-2024-05-13": "2023-10",
"gpt-4o-2024-08-06": "2023-10",
"chatgpt-4o-latest": "2023-10",
"gpt-4o-mini": "2023-10",
"gpt-4o-mini-2024-07-18": "2023-10",
"gpt-4-vision-preview": "2023-04",
"o1-mini": "2023-10",
"o1-preview": "2023-10",
// After improvements,
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
"gemini-pro": "2023-12",
Expand Down Expand Up @@ -237,11 +240,15 @@ const openaiModels = [
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4o-2024-08-06",
"chatgpt-4o-latest",
"gpt-4o-mini",
"gpt-4o-mini-2024-07-18",
"gpt-4-vision-preview",
"gpt-4-turbo-2024-04-09",
"gpt-4-1106-preview",
"dall-e-3",
"o1-mini",
"o1-preview",
];

const googleModels = [
Expand Down
6 changes: 3 additions & 3 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export function isFunctionCallModel(modelName: string) {
"claude-3-5-sonnet-20240620",
];
if (specialModels.some((keyword) => modelName === keyword)) return true;
return DEFAULT_MODELS.filter((model) => model.provider.id === "openai").some(
(model) => model.name === modelName,
);
return DEFAULT_MODELS.filter(
(model) => model.provider.id === "openai" && !model.name.includes("o1"),
).some((model) => model.name === modelName);
}

0 comments on commit f048295

Please sign in to comment.