Skip to content

Commit

Permalink
✨ feat: add 2 new models to openai provider (lobehub#3470)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielglh authored Aug 14, 2024
1 parent 660bcc7 commit cc9ffdd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion src/config/modelProviders/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,27 @@ const OpenAI: ModelProviderCard = {
tokens: 128_000,
vision: true,
},
{
description: 'Latest GPT-4o snapshot that supports Structured Outputs',
displayName: 'GPT-4o (240806)',
enabled: true,
functionCall: true,
id: 'gpt-4o-2024-08-06',
tokens: 128_000,
vision: true,
},
{
description: 'Dynamic model continuously updated to the current version of GPT-4o in ChatGPT',
displayName: 'ChatGPT-4o',
enabled: true,
functionCall: true,
id: 'chatgpt-4o-latest',
tokens: 128_000,
vision: true,
},
{
description: 'GPT-4 Turbo with Vision',
displayName: 'GPT-4 Turbo',
enabled: true,
functionCall: true,
id: 'gpt-4-turbo',
tokens: 128_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('modelProviderSelectors', () => {
const s = merge(initialState, {}) as unknown as UserStore;

const result = modelProviderSelectors.getDefaultEnabledModelsById('openai')(s);
expect(result).toEqual(['gpt-4o-mini', 'gpt-4o', 'gpt-4-turbo']);
expect(result).toEqual(['gpt-4o-mini', 'gpt-4o', 'gpt-4o-2024-08-06', 'chatgpt-4o-latest']);
});

it('should return undefined for a non-existing provider', () => {
Expand Down

0 comments on commit cc9ffdd

Please sign in to comment.