mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-10 12:38:52 +01:00
🚀 feat: Support for GPT-4 Turbo/0125 Models (#1643)
This commit is contained in:
parent
d0730d2515
commit
fcbaa74e4a
7 changed files with 44 additions and 5 deletions
|
|
@ -35,6 +35,10 @@ const getValueKey = (model, endpoint) => {
|
|||
return '4k';
|
||||
} else if (modelName.includes('gpt-4-1106')) {
|
||||
return 'gpt-4-1106';
|
||||
} else if (modelName.includes('gpt-4-0125')) {
|
||||
return 'gpt-4-1106';
|
||||
} else if (modelName.includes('gpt-4-turbo')) {
|
||||
return 'gpt-4-1106';
|
||||
} else if (modelName.includes('gpt-4-32k')) {
|
||||
return '32k';
|
||||
} else if (modelName.includes('gpt-4')) {
|
||||
|
|
|
|||
|
|
@ -84,6 +84,12 @@ describe('getMultiplier', () => {
|
|||
expect(getMultiplier({ tokenType: 'completion', model: 'gpt-4-1106-vision-preview' })).toBe(
|
||||
tokenValues['gpt-4-1106'].completion,
|
||||
);
|
||||
expect(getMultiplier({ tokenType: 'completion', model: 'gpt-4-0125-preview' })).toBe(
|
||||
tokenValues['gpt-4-1106'].completion,
|
||||
);
|
||||
expect(getMultiplier({ tokenType: 'completion', model: 'gpt-4-turbo-vision-preview' })).toBe(
|
||||
tokenValues['gpt-4-1106'].completion,
|
||||
);
|
||||
});
|
||||
|
||||
it('should return defaultRate if derived valueKey does not match any known patterns', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue