Skip to content

Commit

Permalink
Add gpt-4-turbo and gpt-4-turbo-preview models for supporting 0409 an…
Browse files Browse the repository at this point in the history
…d preview versions GPT-4.
  • Loading branch information
maozdemir committed Apr 11, 2024
1 parent eb18479 commit 8ed0a70
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const modelOptions: ModelOptions[] = [
'gpt-3.5-turbo-0125',
'gpt-4',
'gpt-4-32k',
'gpt-4-turbo',
'gpt-4-turbo-preview',
'gpt-4-1106-preview',
'gpt-4-0125-preview'
// 'gpt-3.5-turbo-0301',
Expand All @@ -47,6 +49,8 @@ export const modelMaxToken = {
'gpt-4-32k': 32768,
'gpt-4-32k-0314': 32768,
'gpt-4-32k-0613': 32768,
'gpt-4-turbo': 128000,
'gpt-4-turbo-preview': 128000,
'gpt-4-1106-preview': 128000,
'gpt-4-0125-preview': 128000,
};
Expand Down Expand Up @@ -84,6 +88,14 @@ export const modelCost = {
prompt: { price: 0.03, unit: 1000 },
completion: { price: 0.06, unit: 1000 },
},
'gpt-4-turbo': {
prompt: { price: 10.00, unit: 1000000 },
completion: { price: 30.00, unit: 1000000 },
},
'gpt-4-turbo-preview': {
prompt: { price: 10.00, unit: 1000000 },
completion: { price: 30.00, unit: 1000000 },
},
'gpt-4-0314': {
prompt: { price: 0.03, unit: 1000 },
completion: { price: 0.06, unit: 1000 },
Expand Down
2 changes: 2 additions & 0 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export type ModelOptions =
| 'gpt-4-32k'
| 'gpt-4-1106-preview'
| 'gpt-4-0125-preview'
| 'gpt-4-turbo'
| 'gpt-4-turbo-preview'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-1106'
Expand Down

0 comments on commit 8ed0a70

Please sign in to comment.