Skip to content

Commit

Permalink
3.5-turbo-1106 + type modelchoice full
Browse files Browse the repository at this point in the history
  • Loading branch information
jackschedel committed Jan 2, 2024
1 parent bfc808a commit cfb2c30
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
6 changes: 1 addition & 5 deletions src/components/Chat/ChatContent/ModelConfigBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import useStore from '@store/store';
import ConfigMenu from '@components/ConfigMenu';
import { ChatInterface, ConfigInterface } from '@type/chat';
import { ModelChoice } from '@type/chat';
import {
_defaultChatConfig,
modelMaxToken,
modelOptions,
} from '@constants/chat';
import { _defaultChatConfig, modelMaxToken } from '@constants/chat';
import { ModelSelect } from '@components/ConfigMenu/ModelSelect';

const ModelConfigBar = React.memo(() => {
Expand Down
9 changes: 6 additions & 3 deletions src/constants/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ export const modelOptions: ModelChoice[] = [
'gpt-4-32k',
'claude-2',
'claude-instant-1',
// 'gpt-3.5-turbo-0301',
// 'gpt-4-0314',
// 'gpt-4-32k-0314',
'gpt-3.5-turbo-1106',
];

export const defaultModel = 'gpt-3.5-turbo';

export const modelMaxToken = {
'gpt-3.5-turbo': 4096,
'gpt-3.5-turbo-1106': 16385,
'gpt-3.5-turbo-0301': 4096,
'gpt-3.5-turbo-0613': 4096,
'gpt-3.5-turbo-16k': 16384,
Expand All @@ -54,6 +53,10 @@ export const modelCost = {
prompt: { price: 0.0015, unit: 1000 },
completion: { price: 0.002, unit: 1000 },
},
'gpt-3.5-turbo-1106': {
prompt: { price: 0.001, unit: 1000 },
completion: { price: 0.0015, unit: 1000 },
},
'gpt-3.5-turbo-0301': {
prompt: { price: 0.0015, unit: 1000 },
completion: { price: 0.002, unit: 1000 },
Expand Down
25 changes: 15 additions & 10 deletions src/types/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,21 @@ export interface Folder {
}

export type ModelChoice =
| 'gpt-4'
| 'gpt-4-32k'
| 'gpt-4-1106-preview'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-16k'
| 'claude-2'
| 'claude-instant-1';
// | 'gpt-3.5-turbo-0301';
// | 'gpt-4-0314'
// | 'gpt-4-32k-0314'
| 'gpt-3.5-turbo'
| 'gpt-3.5-turbo-1106'
| 'gpt-3.5-turbo-0301'
| 'gpt-3.5-turbo-0613'
| 'gpt-3.5-turbo-16k'
| 'gpt-3.5-turbo-16k-0613'
| 'gpt-4'
| 'gpt-4-0314'
| 'gpt-4-0613'
| 'gpt-4-1106-preview'
| 'gpt-4-32k'
| 'gpt-4-32k-0314'
| 'gpt-4-32k-0613'
| 'claude-2'
| 'claude-instant-1';

export type TotalTokenUsed = {
[model in ModelChoice]?: {
Expand Down

0 comments on commit cfb2c30

Please sign in to comment.