Skip to content

Commit

Permalink
Added support for "gpt-4-turbo-2024-04-09" and "gpt-4-turbo" models. (#…
Browse files Browse the repository at this point in the history
…572)

* Update chat.ts

Added support for "gpt-4-turbo-2024-04-09" and "gpt-4-turbo" models.

* Update chat.ts

Added support for "gpt-4-turbo-2024-04-09" and "gpt-4-turbo" models.
  • Loading branch information
ChenYuZe519 committed Apr 12, 2024
1 parent eb18479 commit 42ff19c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export const modelOptions: ModelOptions[] = [
'gpt-4',
'gpt-4-32k',
'gpt-4-1106-preview',
'gpt-4-0125-preview'
'gpt-4-0125-preview',
'gpt-4-turbo',
'gpt-4-turbo-2024-04-09'
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand All @@ -49,6 +51,8 @@ export const modelMaxToken = {
'gpt-4-32k-0613': 32768,
'gpt-4-1106-preview': 128000,
'gpt-4-0125-preview': 128000,
'gpt-4-turbo': 128000,
'gpt-4-turbo-2024-04-09': 128000,
};

export const modelCost = {
Expand Down Expand Up @@ -112,6 +116,14 @@ export const modelCost = {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
'gpt-4-turbo': {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
'gpt-4-turbo-2024-04-09': {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
};

export const defaultUserMaxToken = 4000;
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-2024-04-09'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-1106'
Expand Down

0 comments on commit 42ff19c

Please sign in to comment.