diff --git a/package.json b/package.json index ac62bbabc..63a8feb6f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "better-chatgpt", "private": true, - "version": "1.0.4", + "version": "1.0.5", "type": "module", "homepage": "./", "main": "electron/index.cjs", diff --git a/src/constants/chat.ts b/src/constants/chat.ts index 07985497b..f806ef1b6 100644 --- a/src/constants/chat.ts +++ b/src/constants/chat.ts @@ -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', @@ -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 = { @@ -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; diff --git a/src/types/chat.ts b/src/types/chat.ts index 54f7d286f..5b706952a 100644 --- a/src/types/chat.ts +++ b/src/types/chat.ts @@ -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'