File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,12 @@ export async function initApi(key: KeyConfig, chatModel: string) {
5454 // Set the token limits based on the model's type. This is because different models have different token limits.
5555 // The token limit includes the token count from both the message array sent and the model response.
5656 // 'gpt-35-turbo' has a limit of 4096 tokens, 'gpt-4' and 'gpt-4-32k' have limits of 8192 and 32768 tokens respectively.
57-
57+ // Check if the model type is GPT-4-turbo
58+ if ( model . toLowerCase ( ) . includes ( '1106-preview' ) ) {
59+ //If it's a '1106-preview' model, set the maxModelTokens to 131072
60+ options . maxModelTokens = 131072
61+ options . maxResponseTokens = 32768
62+ }
5863 // Check if the model type includes '16k'
5964 if ( model . toLowerCase ( ) . includes ( '16k' ) ) {
6065 // If it's a '16k' model, set the maxModelTokens to 16384 and maxResponseTokens to 4096
You can’t perform that action at this time.
0 commit comments