Skip to content

Commit

Permalink
✨ feat: Update models [force patch]
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Aug 6, 2024
1 parent 682ab64 commit 9608217
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions packages/common/models.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// refs: https://github.com/lobehub/lobe-chat/blob/main/src/config/modelProviders/openai.ts

export enum LanguageModel {
/**
* GPT 3.5 Turbo
Expand All @@ -10,22 +12,36 @@ export enum LanguageModel {
* GPT 4
*/
GPT4 = 'gpt-4',
GPT4_0125_PREVIEW = 'gpt-4-0125-preview',
GPT4_0613 = 'gpt-4-0613',
GPT4_32K = 'gpt-4-32k',
GPT4_PREVIEW = 'gpt-4-1106-preview',
GPT4_PREVIEW = 'gpt-4-0125-preview',
GPT4_TURBO = 'gpt-4-turbo',
GPT4_TURBO_1106 = 'gpt-4-1106-preview',
GPT4_TURBO_1106_VISION = 'gpt-4-1106-vision-preview',
GPT4_TURBO_2024_05_13 = 'gpt-4o-2024-05-13',
GPT4_TURBO_2024_07_18 = 'gpt-4o-mini',
GPT4_TURBO_PREVIEW = 'gpt-4-turbo-preview',
GPT4_TURBO_VISION = 'gpt-4-turbo-vision',
GPT4_VISION_PREVIEW = 'gpt-4-vision-preview',
}

export const ModelTokens: Record<LanguageModel, number> = {
[LanguageModel.GPT3_5]: 4096,
[LanguageModel.GPT3_5]: 16_385,
[LanguageModel.GPT3_5_0125]: 16_385,
[LanguageModel.GPT3_5_1106]: 16_385,
[LanguageModel.GPT3_5_16K]: 16_385,
[LanguageModel.GPT3_5_0125]: 16_385,
[LanguageModel.GPT4]: 8196,
[LanguageModel.GPT4]: 8192,
[LanguageModel.GPT4_0613]: 8192,
[LanguageModel.GPT4_32K]: 32_768,
[LanguageModel.GPT4_PREVIEW]: 128_000,
[LanguageModel.GPT4_VISION_PREVIEW]: 128_000,
[LanguageModel.GPT4_0125_PREVIEW]: 128_000,
[LanguageModel.GPT4_32K]: 32_768,
[LanguageModel.GPT4_TURBO]: 128_000,
[LanguageModel.GPT4_TURBO_VISION]: 128_000,
[LanguageModel.GPT4_TURBO_PREVIEW]: 128_000,
[LanguageModel.GPT4_TURBO_1106_VISION]: 128_000,
[LanguageModel.GPT4_TURBO_1106]: 128_000,
[LanguageModel.GPT4_TURBO_2024_05_13]: 128_000,
[LanguageModel.GPT4_TURBO_2024_07_18]: 16_385,
};

export const defaultModel = LanguageModel.GPT3_5_0125;
export const defaultModel = LanguageModel.GPT4_TURBO_2024_07_18;

0 comments on commit 9608217

Please sign in to comment.