Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

update claude3.5-sonnet

usamimeri_renkoe2881778257a
diff --git a/config/examples/anthropic-claude-3-opus.yaml b/config/examples/anthropic-claude-3-5-sonnet.yaml
similarity index 61%
rename from config/examples/anthropic-claude-3-opus.yaml
rename to config/examples/anthropic-claude-3-5-sonnet.yaml
index db8095f4f..7c4df6064 100644
--- a/config/examples/anthropic-claude-3-opus.yaml
+++ b/config/examples/anthropic-claude-3-5-sonnet.yaml
@@ -2,4 +2,4 @@ llm:
api_type: 'claude' # or anthropic
base_url: 'https://api.anthropic.com'
api_key: 'YOUR_API_KEY'
- model: 'claude-3-opus-20240229'
\ No newline at end of file
+ model: 'claude-3-5-sonnet-20240620' # or 'claude-3-opus-20240229'
\ No newline at end of file
diff --git a/metagpt/utils/token_counter.py b/metagpt/utils/token_counter.py
index ef6f886e2..373b19973 100644
--- a/metagpt/utils/token_counter.py
+++ b/metagpt/utils/token_counter.py
@@ -57,7 +57,9 @@ TOKEN_COSTS = {
"claude-2.0": {"prompt": 0.008, "completion": 0.024},
"claude-2.1": {"prompt": 0.008, "completion": 0.024},
"claude-3-sonnet-20240229": {"prompt": 0.003, "completion": 0.015},
+ "claude-3-5-sonnet-20240620": {"prompt": 0.003, "completion": 0.015},
"claude-3-opus-20240229": {"prompt": 0.015, "completion": 0.075},
+ "claude-3-haiku-20240307": {"prompt": 0.00025, "completion": 0.00125},
"yi-34b-chat-0205": {"prompt": 0.0003, "completion": 0.0003},
"yi-34b-chat-200k": {"prompt": 0.0017, "completion": 0.0017},
"yi-large": {"prompt": 0.0028, "completion": 0.0028},
@@ -208,6 +210,8 @@ TOKEN_MAX = {
"claude-2.1": 200000,
"claude-3-sonnet-20240229": 200000,
"claude-3-opus-20240229": 200000,
+ "claude-3-5-sonnet-20240620":200000,
+ "claude-3-haiku-20240307":200000,
"yi-34b-chat-0205": 4000,
"yi-34b-chat-200k": 200000,
"yi-large": 16385,