Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced the functionality for downloading image-based chat records; added support for the "o1-preview" and "o1-preview-2024-09-12" and "o1-mini" and "o1-mini-2024-09-12" and "chatgpt-4o-latest" and "gpt-4o-2024-11-20" and "gpt-4o-2024-08-06" and "gpt-4o-mini-2024-07-18" and "gpt-4o-mini" models, and revised the default model settings. #606

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const dateString =
export const _defaultSystemMessage =
import.meta.env.VITE_DEFAULT_SYSTEM_MESSAGE ??
`You are ChatGPT, a large language model trained by OpenAI.
Carefully heed the user's instructions.
Carefully heed the user's instructions.
Respond using Markdown.`;

export const modelOptions: ModelOptions[] = [
Expand All @@ -28,14 +28,17 @@ export const modelOptions: ModelOptions[] = [
'gpt-4-0125-preview',
'gpt-4-turbo',
'gpt-4-turbo-2024-04-09',
'gpt-4o-mini',
'gpt-4o-mini-2024-07-18',
'gpt-4o',
'gpt-4o-2024-05-13',
'gpt-4o-2024-08-06',
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
];

export const defaultModel = 'gpt-3.5-turbo';
export const defaultModel = 'gpt-4o-mini';

export const modelMaxToken = {
'gpt-3.5-turbo': 4096,
Expand All @@ -55,8 +58,11 @@ export const modelMaxToken = {
'gpt-4-0125-preview': 128000,
'gpt-4-turbo': 128000,
'gpt-4-turbo-2024-04-09': 128000,
'gpt-4o-mini': 128000,
'gpt-4o-mini-2024-07-18': 128000,
'gpt-4o': 128000,
'gpt-4o-2024-05-13': 128000,
'gpt-4o-2024-08-06': 128000,
};

export const modelCost = {
Expand Down Expand Up @@ -128,6 +134,14 @@ export const modelCost = {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, unit: 1000 },
},
'gpt-4o-mini': {
prompt: { price: 0.00015, unit: 1000 },
completion: { price: 0.00060, unit: 1000 },
},
'gpt-4o-mini-2024-07-18': {
prompt: { price: 0.00015, unit: 1000 },
completion: { price: 0.00060, unit: 1000 },
},
'gpt-4o': {
prompt: { price: 0.005, unit: 1000 },
completion: { price: 0.015, unit: 1000 },
Expand All @@ -136,6 +150,10 @@ export const 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.010, unit: 1000 },
},
};

export const defaultUserMaxToken = 4000;
Expand Down
3 changes: 3 additions & 0 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ export interface Folder {
}

export type ModelOptions =
| 'gpt-4o-mini'
| 'gpt-4o-mini-2024-07-18'
| 'gpt-4o'
| 'gpt-4o-2024-05-13'
| 'gpt-4o-2024-08-06'
| 'gpt-4'
| 'gpt-4-32k'
| 'gpt-4-1106-preview'
Expand Down