Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'ztjhz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zewebdev1337 authored May 17, 2024
2 parents 6fe9fa2 + fbc47eb commit 3152ff7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 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.0.4",
"version": "1.0.5",
"type": "module",
"homepage": "./",
"main": "electron/index.cjs",
Expand Down
26 changes: 25 additions & 1 deletion src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ 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-4o',
'gpt-4o-2024-05-13',
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand All @@ -49,6 +53,10 @@ 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,
'gpt-4o': 128000,
'gpt-4o-2024-05-13': 128000,
};

export const modelCost = {
Expand Down Expand Up @@ -112,6 +120,22 @@ 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 },
},
'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
4 changes: 4 additions & 0 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ export interface Folder {
}

export type ModelOptions =
| 'gpt-4o'
| 'gpt-4o-2024-05-13'
| 'gpt-4'
| '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 3152ff7

Please sign in to comment.