Skip to content

Commit

Permalink
feat(configs-drivers-anthropic): update default models
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter committed Mar 3, 2025
1 parent e2f8851 commit 554dd51
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/examples/src/talk_to_a_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def on_after_run(_: BaseTask) -> None:
agent = Agent(
tasks=[
PromptTask(
prompt_driver=AnthropicPromptDriver(model="claude-3-5-sonnet-20240620", max_attempts=0),
prompt_driver=AnthropicPromptDriver(model="claude-3-7-sonnet-latest", max_attempts=0),
on_before_run=on_before_run,
on_after_run=on_after_run,
input=[
Expand Down
2 changes: 1 addition & 1 deletion docs/griptape-framework/structures/src/config_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

Defaults.drivers_config = AnthropicDriversConfig()
anthropic_agent = Agent(
prompt_driver=AnthropicPromptDriver(model="claude-3-5-sonnet-20240620"), # Override the default prompt driver
prompt_driver=AnthropicPromptDriver(model="claude-3-7-sonnet-latest"), # Override the default prompt driver
)
2 changes: 1 addition & 1 deletion griptape/configs/drivers/anthropic_drivers_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
class AnthropicDriversConfig(DriversConfig):
@lazy_property()
def prompt_driver(self) -> AnthropicPromptDriver:
return AnthropicPromptDriver(model="claude-3-5-sonnet-20240620")
return AnthropicPromptDriver(model="claude-3-7-sonnet-latest")
3 changes: 2 additions & 1 deletion griptape/tokenizers/amazon_bedrock_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class AmazonBedrockTokenizer(BaseTokenizer):
"amazon.titan-text-premier-v1": 32000,
}
MODEL_PREFIXES_TO_MAX_OUTPUT_TOKENS = {
"anthropic.claude-3": 8192,
"anthropic.claude-3-7": 8192,
"anthropic.claude-3-5": 8192,
"anthropic.claude": 4096,
"cohere": 4096,
"ai21.j2": 8191,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_to_dict(self, config):
"temperature": 0.1,
"max_tokens": 1000,
"stream": False,
"model": "claude-3-5-sonnet-20240620",
"model": "claude-3-7-sonnet-latest",
"top_p": 0.999,
"top_k": 250,
"use_native_tools": True,
Expand Down

0 comments on commit 554dd51

Please sign in to comment.