mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +01:00
🪙 refactor: Update tokens.js for Added Context Buffer from Max (#1573)
* Update tokens.js * chore: linting previous PR * chore: adjust token limits, add buffers * chore: linting * chore: adjust 32k gpt-4 limit
This commit is contained in:
parent
963dbf3a1e
commit
638f9242e5
7 changed files with 359 additions and 347 deletions
|
|
@ -40,19 +40,19 @@ const models = [
|
|||
];
|
||||
|
||||
const openAIModels = {
|
||||
'gpt-4': 8191,
|
||||
'gpt-4-0613': 8191,
|
||||
'gpt-4-32k': 32767,
|
||||
'gpt-4-32k-0314': 32767,
|
||||
'gpt-4-32k-0613': 32767,
|
||||
'gpt-3.5-turbo': 4095,
|
||||
'gpt-3.5-turbo-0613': 4095,
|
||||
'gpt-3.5-turbo-0301': 4095,
|
||||
'gpt-3.5-turbo-16k': 15999,
|
||||
'gpt-3.5-turbo-16k-0613': 15999,
|
||||
'gpt-3.5-turbo-1106': 16380, // -5 from max
|
||||
'gpt-4-1106': 127995, // -5 from max
|
||||
'mistral-': 31995, // -5 from max
|
||||
'gpt-4': 8187, // -5 from max
|
||||
'gpt-4-0613': 8187, // -5 from max
|
||||
'gpt-4-32k': 32758, // -10 from max
|
||||
'gpt-4-32k-0314': 32758, // -10 from max
|
||||
'gpt-4-32k-0613': 32758, // -10 from max
|
||||
'gpt-3.5-turbo': 4092, // -5 from max
|
||||
'gpt-3.5-turbo-0613': 4092, // -5 from max
|
||||
'gpt-3.5-turbo-0301': 4092, // -5 from max
|
||||
'gpt-3.5-turbo-16k': 16375, // -10 from max
|
||||
'gpt-3.5-turbo-16k-0613': 16375, // -10 from max
|
||||
'gpt-3.5-turbo-1106': 16375, // -10 from max
|
||||
'gpt-4-1106': 127990, // -10 from max
|
||||
'mistral-': 31990, // -10 from max
|
||||
};
|
||||
|
||||
// Order is important here: by model series and context size (gpt-4 then gpt-3, ascending)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue