Skip to content

Commit 8501992

Browse files
committed
Support gpt-4-turbo model
1 parent 9673957 commit 8501992

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/app/bots/chatgpt-api/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ export class ChatGPTApiBot extends AbstractChatGPTApiBot {
132132

133133
private getModelName() {
134134
const { chatgptApiModel } = this.config
135+
if (chatgptApiModel === 'gpt-4-turbo') {
136+
return 'gpt-4-1106-preview'
137+
}
135138
return chatgptApiModel
136139
}
137140

src/app/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const CHATBOTS: Record<BotId, { name: string; avatar: any }> = {
7474
}
7575

7676
export const CHATGPT_HOME_URL = 'https://chat.openai.com'
77-
export const CHATGPT_API_MODELS = ['gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4', 'gpt-4-32k'] as const
77+
export const CHATGPT_API_MODELS = ['gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4', 'gpt-4-32k', 'gpt-4-turbo'] as const
7878
export const ALL_IN_ONE_PAGE_ID = 'all'
7979

8080
export const DEFAULT_CHATGPT_SYSTEM_MESSAGE =

0 commit comments

Comments
 (0)