Skip to content

Commit

Permalink
Added gpt-4-0125-preview as a model option (#521)
Browse files Browse the repository at this point in the history
* Added gpt-4-0125-preview as a model option

* Upped the token limit to 128000 as per https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo

* reverted token length to 4096

---------

Co-authored-by: Jing Hua <tohjinghua123@gmail.com>
  • Loading branch information
DigitallyTailored and ztjhz committed Feb 2, 2024
1 parent 1f371fe commit ecad41f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const modelOptions: ModelOptions[] = [
'gpt-4',
'gpt-4-32k',
'gpt-4-1106-preview',
'gpt-4-0125-preview'
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand All @@ -47,6 +48,7 @@ export const modelMaxToken = {
'gpt-4-32k-0314': 32768,
'gpt-4-32k-0613': 32768,
'gpt-4-1106-preview': 128000,
'gpt-4-0125-preview': 4096,
};

export const modelCost = {
Expand Down Expand Up @@ -106,6 +108,10 @@ export const modelCost = {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
'gpt-4-0125-preview': {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
};

export const defaultUserMaxToken = 4000;
Expand Down
1 change: 1 addition & 0 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export type ModelOptions =
| 'gpt-4'
| 'gpt-4-32k'
| 'gpt-4-1106-preview'
| 'gpt-4-0125-preview'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-1106'
Expand Down

0 comments on commit ecad41f

Please sign in to comment.