Skip to content

Commit

Permalink
Add gpt-3.5-turbo-16k model option, update gpt-3.5 prompt cost (#351)
Browse files Browse the repository at this point in the history
* add gpt-3.5-turbo-16k model option. update gpt-3.5 prompt cost

* add gpt-4-0613 models
  • Loading branch information
akira0245 authored Jun 14, 2023
1 parent 6a022d9 commit f28ff87
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 28 additions & 2 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Respond using Markdown.`;

export const modelOptions: ModelOptions[] = [
'gpt-3.5-turbo',
'gpt-3.5-turbo-16k',
'gpt-4',
'gpt-4-32k',
// 'gpt-3.5-turbo-0301',
Expand All @@ -31,21 +32,38 @@ export const defaultModel = 'gpt-3.5-turbo';
export const modelMaxToken = {
'gpt-3.5-turbo': 4096,
'gpt-3.5-turbo-0301': 4096,
'gpt-3.5-turbo-0613': 4096,
'gpt-3.5-turbo-16k': 16384,
'gpt-3.5-turbo-16k-0613': 16384,
'gpt-4': 8192,
'gpt-4-0314': 8192,
'gpt-4-0613': 8192,
'gpt-4-32k': 32768,
'gpt-4-32k-0314': 32768,
'gpt-4-32k-0613': 32768,
};

export const modelCost = {
'gpt-3.5-turbo': {
prompt: { price: 0.002, unit: 1000 },
prompt: { price: 0.0015, unit: 1000 },
completion: { price: 0.002, unit: 1000 },
},
'gpt-3.5-turbo-0301': {
prompt: { price: 0.002, unit: 1000 },
prompt: { price: 0.0015, unit: 1000 },
completion: { price: 0.002, unit: 1000 },
},
'gpt-3.5-turbo-0613': {
prompt: { price: 0.0015, unit: 1000 },
completion: { price: 0.002, unit: 1000 },
},
'gpt-3.5-turbo-16k': {
prompt: { price: 0.003, unit: 1000 },
completion: { price: 0.004, unit: 1000 },
},
'gpt-3.5-turbo-16k-0613': {
prompt: { price: 0.003, unit: 1000 },
completion: { price: 0.004, unit: 1000 },
},
'gpt-4': {
prompt: { price: 0.03, unit: 1000 },
completion: { price: 0.06, unit: 1000 },
Expand All @@ -54,6 +72,10 @@ export const modelCost = {
prompt: { price: 0.03, unit: 1000 },
completion: { price: 0.06, unit: 1000 },
},
'gpt-4-0613': {
prompt: { price: 0.03, unit: 1000 },
completion: { price: 0.06, unit: 1000 },
},
'gpt-4-32k': {
prompt: { price: 0.06, unit: 1000 },
completion: { price: 0.12, unit: 1000 },
Expand All @@ -62,6 +84,10 @@ export const modelCost = {
prompt: { price: 0.06, unit: 1000 },
completion: { price: 0.12, unit: 1000 },
},
'gpt-4-32k-0613': {
prompt: { price: 0.06, unit: 1000 },
completion: { price: 0.12, unit: 1000 },
},
};

export const defaultUserMaxToken = 4000;
Expand Down
2 changes: 1 addition & 1 deletion src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface Folder {
color?: string;
}

export type ModelOptions = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo';
export type ModelOptions = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' ;
// | 'gpt-3.5-turbo-0301';
// | 'gpt-4-0314'
// | 'gpt-4-32k-0314'
Expand Down

0 comments on commit f28ff87

Please sign in to comment.