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 authored and AI-Maria committed May 30, 2024
1 parent 21e54ad commit 9fdcc52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ export const modelTypes: ModelTypes = {
'gpt-4-1106-preview': 'text',
'gpt-4-0125-preview': 'text',
'gpt-4-vision-preview': 'image'
'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 @@ -77,6 +77,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 9fdcc52

Please sign in to comment.