Skip to content

Commit

Permalink
feat: support new OpenAI model GPT-4o
Browse files Browse the repository at this point in the history
  • Loading branch information
mondaychen committed May 13, 2024
1 parent 60e11f5 commit 1c8c4aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/helpers/aiSdkUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum SupportedModels {
Gpt4TurboPreview = "gpt-4-turbo-preview",
Gpt4VisionPreview = "gpt-4-vision-preview",
Gpt4Turbo = "gpt-4-turbo",
Gpt4O = "gpt-4o",
Claude3Sonnet = "claude-3-sonnet-20240229",
}

Expand All @@ -24,13 +25,15 @@ export const DisplayName = {
[SupportedModels.Gpt4TurboPreview]: "GPT-4 Turbo (Preview)",
[SupportedModels.Gpt4VisionPreview]: "GPT-4 Vision (Preview)",
[SupportedModels.Gpt4Turbo]: "GPT-4 Turbo",
[SupportedModels.Gpt4O]: "GPT-4o",
[SupportedModels.Claude3Sonnet]: "Claude 3 Sonnet",
};

export function hasVisionSupport(model: SupportedModels) {
return (
model === SupportedModels.Gpt4VisionPreview ||
model === SupportedModels.Gpt4Turbo ||
model === SupportedModels.Gpt4O ||
model === SupportedModels.Claude3Sonnet
);
}
Expand Down

0 comments on commit 1c8c4aa

Please sign in to comment.