mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +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) {
|
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;
|
delete modelOptions.model;
|
||||||
|
|
||||||
opts.baseURL = this.langchainProxy
|
opts.baseURL = this.langchainProxy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue