Skip to content

Commit

Permalink
feat: Add new GPT-4 Turbo preview. (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
maozdemir committed Nov 8, 2023
1 parent d93df35 commit 3e501ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const modelOptions: ModelOptions[] = [
'gpt-3.5-turbo-16k',
'gpt-4',
'gpt-4-32k',
'gpt-4-1106-preview'
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
Expand All @@ -41,6 +42,7 @@ export const modelMaxToken = {
'gpt-4-32k': 32768,
'gpt-4-32k-0314': 32768,
'gpt-4-32k-0613': 32768,
'gpt-4-1106-preview': 128000,
};

export const modelCost = {
Expand Down Expand Up @@ -88,6 +90,10 @@ export const modelCost = {
prompt: { price: 0.06, unit: 1000 },
completion: { price: 0.12, unit: 1000 },
},
'gpt-4-1106-preview': {
prompt: { price: 0.01, unit: 1000 },
completion: { price: 0.03, 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' | 'gpt-3.5-turbo-16k' ;
export type ModelOptions = 'gpt-4' | 'gpt-4-32k' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-4-1106-preview' ;
// | 'gpt-3.5-turbo-0301';
// | 'gpt-4-0314'
// | 'gpt-4-32k-0314'
Expand Down

0 comments on commit 3e501ea

Please sign in to comment.