mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🤖 feat: Claude 3.5 Haiku (#4629)
This commit is contained in:
parent
2e519f9b57
commit
fc41032923
6 changed files with 28 additions and 4 deletions
|
|
@ -92,6 +92,20 @@ describe('getValueKey', () => {
|
|||
expect(getValueKey('claude-3.5-sonnet-turbo')).toBe('claude-3.5-sonnet');
|
||||
expect(getValueKey('claude-3.5-sonnet-0125')).toBe('claude-3.5-sonnet');
|
||||
});
|
||||
|
||||
it('should return "claude-3-5-haiku" for model type of "claude-3-5-haiku-"', () => {
|
||||
expect(getValueKey('claude-3-5-haiku-20240620')).toBe('claude-3-5-haiku');
|
||||
expect(getValueKey('anthropic/claude-3-5-haiku')).toBe('claude-3-5-haiku');
|
||||
expect(getValueKey('claude-3-5-haiku-turbo')).toBe('claude-3-5-haiku');
|
||||
expect(getValueKey('claude-3-5-haiku-0125')).toBe('claude-3-5-haiku');
|
||||
});
|
||||
|
||||
it('should return "claude-3.5-haiku" for model type of "claude-3.5-haiku-"', () => {
|
||||
expect(getValueKey('claude-3.5-haiku-20240620')).toBe('claude-3.5-haiku');
|
||||
expect(getValueKey('anthropic/claude-3.5-haiku')).toBe('claude-3.5-haiku');
|
||||
expect(getValueKey('claude-3.5-haiku-turbo')).toBe('claude-3.5-haiku');
|
||||
expect(getValueKey('claude-3.5-haiku-0125')).toBe('claude-3.5-haiku');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getMultiplier', () => {
|
||||
|
|
@ -248,6 +262,8 @@ describe('getCacheMultiplier', () => {
|
|||
it('should return the correct cache multiplier for a given valueKey and cacheType', () => {
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-5-sonnet', cacheType: 'write' })).toBe(3.75);
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-5-sonnet', cacheType: 'read' })).toBe(0.3);
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-5-haiku', cacheType: 'write' })).toBe(1.25);
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-5-haiku', cacheType: 'read' })).toBe(0.1);
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-haiku', cacheType: 'write' })).toBe(0.3);
|
||||
expect(getCacheMultiplier({ valueKey: 'claude-3-haiku', cacheType: 'read' })).toBe(0.03);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue