mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-27 13:48:51 +01:00
fix code to adjust max_tokens according to model selection (#263)
This commit is contained in:
parent
56ea9563b8
commit
262b402606
1 changed files with 2 additions and 1 deletions
|
|
@ -23,12 +23,13 @@ const askClient = async ({
|
|||
};
|
||||
|
||||
const azure = process.env.AZURE_OPENAI_API_KEY ? true : false;
|
||||
|
||||
const max_tokens = (model === "gpt-4") ? 7200 : (model === "gpt-4-32k") ? 31000 : 3071;
|
||||
const clientOptions = {
|
||||
reverseProxyUrl: process.env.OPENAI_REVERSE_PROXY || null,
|
||||
azure,
|
||||
modelOptions: {
|
||||
model: model,
|
||||
max_tokens: max_tokens,
|
||||
temperature,
|
||||
top_p,
|
||||
presence_penalty,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue