Skip to content

Commit

Permalink
Add gpt-4o (#585)
Browse files Browse the repository at this point in the history
* Add gpt-4o to chat.ts

* Add gpt-4o to chat.ts
  • Loading branch information
quasimik committed May 14, 2024
1 parent 21ce9a8 commit fbc47eb
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 @@ -27,7 +27,9 @@ export const modelOptions: ModelOptions[] = [
'gpt-4-1106-preview',
'gpt-4-0125-preview',
'gpt-4-turbo',
'gpt-4-turbo-2024-04-09'
'gpt-4-turbo-2024-04-09',
'gpt-4o',
'gpt-4o-2024-05-13',
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand All @@ -53,6 +55,8 @@ export const modelMaxToken = {
'gpt-4-0125-preview': 128000,
'gpt-4-turbo': 128000,
'gpt-4-turbo-2024-04-09': 128000,
'gpt-4o': 128000,
'gpt-4o-2024-05-13': 128000,
};

export const modelCost = {
Expand Down Expand Up @@ -124,6 +128,14 @@ export const modelCost = {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
'gpt-4o': {
prompt: { price: 0.005, unit: 1000 },
completion: { price: 0.015, unit: 1000 },
},
'gpt-4o-2024-05-13': {
prompt: { price: 0.005, unit: 1000 },
completion: { price: 0.015, 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 @@ -50,6 +50,8 @@ export interface Folder {
}

export type ModelOptions =
| 'gpt-4o'
| 'gpt-4o-2024-05-13'
| 'gpt-4'
| 'gpt-4-32k'
| 'gpt-4-1106-preview'
Expand Down

0 comments on commit fbc47eb

Please sign in to comment.