Skip to content

Commit 0d9466e

Browse files
authored
Merge branch 'main' into main
Signed-off-by: San <zhujunsan@gmail.com>
2 parents b105846 + 63a0f44 commit 0d9466e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

service/src/chatgpt/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export async function initApi(key: KeyConfig, chatModel: string, maxContextCount
5858
// Set the token limits based on the model's type. This is because different models have different token limits.
5959
// The token limit includes the token count from both the message array sent and the model response.
6060
// 'gpt-35-turbo' has a limit of 4096 tokens, 'gpt-4' and 'gpt-4-32k' have limits of 8192 and 32768 tokens respectively.
61+
6162
// Check if the model type is GPT-4-turbo or newer
6263
if (model.toLowerCase().includes('gpt-4o') || model.toLowerCase().includes('gpt-4-turbo') || model.toLowerCase().includes('-preview')) {
6364
// If it's a 'gpt-4o'/'gpt-4-turbo'/'xxxx-preview' model, set the maxModelTokens to 128000

0 commit comments

Comments
 (0)