mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
😎 fix: Azure Bug, short default max_tokens response using gpt-4-vision-preview (#2885)
This commit is contained in:
parent
c704a23749
commit
2b7a973a33
1 changed files with 6 additions and 1 deletions
|
|
@ -1108,7 +1108,12 @@ ${convo}
|
|||
}
|
||||
|
||||
if (this.azure || this.options.azure) {
|
||||
// Azure does not accept `model` in the body, so we need to remove it.
|
||||
/* Azure Bug, extremely short default `max_tokens` response */
|
||||
if (!modelOptions.max_tokens && modelOptions.model === 'gpt-4-vision-preview') {
|
||||
modelOptions.max_tokens = 4000;
|
||||
}
|
||||
|
||||
/* Azure does not accept `model` in the body, so we need to remove it. */
|
||||
delete modelOptions.model;
|
||||
|
||||
opts.baseURL = this.langchainProxy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue