Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit db1bac8

Browse files
authored
feat: add latest Claude model versions (#277)
1 parent 606f80e commit db1bac8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/chat-claude-anthropic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717

1818
$platform = PlatformFactory::create($_ENV['ANTHROPIC_API_KEY']);
19-
$llm = new Claude();
19+
$llm = new Claude(Claude::VERSION_37_SONNET);
2020

2121
$chain = new Chain($platform, $llm);
2222
$messages = new MessageBag(

src/Bridge/Anthropic/Claude.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
final readonly class Claude implements LanguageModel
1010
{
1111
public const VERSION_3_HAIKU = 'claude-3-haiku-20240307';
12+
public const VERSION_35_HAIKU = 'claude-3-5-haiku-20241022';
1213
public const VERSION_3_SONNET = 'claude-3-sonnet-20240229';
1314
public const VERSION_35_SONNET = 'claude-3-5-sonnet-20240620';
15+
public const VERSION_35_SONNET_V2 = 'claude-3-5-sonnet-20241022';
16+
public const VERSION_37_SONNET = 'claude-3-7-sonnet-20250219';
1417
public const VERSION_3_OPUS = 'claude-3-opus-20240229';
1518

1619
/**

0 commit comments

Comments
 (0)