Skip to content

Commit

Permalink
feat: add Claude 3.5 Sonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault committed Jun 22, 2024
1 parent b4d335f commit bfb26b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LLM/Provider/Anthropic.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ enum Anthropic: string implements ProviderModel
case CLAUDE3_HAIKU = 'claude-3-haiku-20240307';
case CLAUDE3_SONNET = 'claude-3-sonnet-20240229';
case CLAUDE3_OPUS = 'claude-3-opus-20240229';
case CLAUDE35_SONNET = 'claude-3-5-sonnet-20240620';

public function getApiKeyEnvVar(): ?string
{
Expand Down Expand Up @@ -52,12 +53,14 @@ public function createConfig(string $apiKey): LLMConfig
self::CLAUDE3_HAIKU => 'Claude 3 Haiku',
self::CLAUDE3_SONNET => 'Claude 3 Sonnet',
self::CLAUDE3_OPUS => 'Claude 3 Opus',
self::CLAUDE35_SONNET => 'Claude 3.5 Sonnet',
},
'Anthropic',
match ($this) {
self::CLAUDE3_HAIKU => new Cost(0.25, 1.25),
self::CLAUDE3_SONNET => new Cost(3, 15),
self::CLAUDE3_OPUS => new Cost(15, 75),
self::CLAUDE35_SONNET => new Cost(3, 15),
},
maxTokens: 4096,
systemPrompt: $systemPrompt,
Expand Down

0 comments on commit bfb26b3

Please sign in to comment.