Skip to content

Commit

Permalink
Merge pull request #28 from animalnots/dev
Browse files Browse the repository at this point in the history
Added support for gpt-4o-2024-08-06 model
  • Loading branch information
animalnots authored Aug 7, 2024
2 parents 90d9e0b + f62d962 commit e4e73ea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "better-chatgpt",
"private": true,
"version": "1.3.0",
"version": "1.4.0",
"type": "module",
"homepage": "./",
"main": "electron/index.cjs",
Expand Down
21 changes: 14 additions & 7 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export const modelOptions: ModelOptions[] = [
'gpt-4-turbo-2024-04-09',
'gpt-4o',
'gpt-4o-2024-05-13',
'gpt-4o-2024-08-06',
'gpt-4o-mini',
'gpt-4o-mini-2024-07-18'
'gpt-4o-mini-2024-07-18',
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand Down Expand Up @@ -67,8 +68,9 @@ export const modelMaxToken: { [key: string]: number } = {
'gpt-4-turbo-2024-04-09': 128000,
'gpt-4o': 128000,
'gpt-4o-2024-05-13': 128000,
'gpt-4o-2024-08-06': 128000,
'gpt-4o-mini': 128000,
'gpt-4o-mini-2024-07-18': 128000
'gpt-4o-mini-2024-07-18': 128000,
};

export const modelCost: ModelCost = {
Expand Down Expand Up @@ -148,14 +150,18 @@ export const modelCost: ModelCost = {
prompt: { price: 0.005, unit: 1000 },
completion: { price: 0.015, unit: 1000 },
},
'gpt-4o-2024-08-06': {
prompt: { price: 0.0025, unit: 1000 },
completion: { price: 0.01, unit: 1000 },
},
'gpt-4o-mini': {
prompt: { price: 0.000150, unit: 1000 },
completion: { price: 0.000600, unit: 1000 },
prompt: { price: 0.00015, unit: 1000 },
completion: { price: 0.0006, unit: 1000 },
},
'gpt-4o-mini-2024-07-18': {
prompt: { price: 0.000150, unit: 1000 },
completion: { price: 0.000600, unit: 1000 },
}
prompt: { price: 0.00015, unit: 1000 },
completion: { price: 0.0006, unit: 1000 },
},
};

export const defaultUserMaxToken = 4000;
Expand Down Expand Up @@ -237,6 +243,7 @@ export const modelTypes: { [key: string]: string } = {
'gpt-4o-mini': 'image',
'gpt-4o': 'image',
'gpt-4o-2024-05-13': 'image',
'gpt-4o-2024-08-06': 'image',
'gpt-4-vision-preview': 'image',
};

Expand Down
1 change: 1 addition & 0 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export type ModelOptions =
| 'gpt-4o-mini-2024-07-18'
| 'gpt-4o'
| 'gpt-4o-2024-05-13'
| 'gpt-4o-2024-08-06'
| 'gpt-4-vision-preview'
| 'gpt-4'
| 'gpt-4-32k'
Expand Down

0 comments on commit e4e73ea

Please sign in to comment.