diff --git a/examples/bedrock.py b/examples/bedrock.py index 7b1d85f51..8b9be1351 100644 --- a/examples/bedrock.py +++ b/examples/bedrock.py @@ -1,4 +1,4 @@ -#!/usr/bin/env -S poetry run python +#!/usr/bin/env -S uv run python # Note: you must have installed `anthropic` with the `bedrock` extra # e.g. `pip install -U anthropic[bedrock]` diff --git a/examples/text_completions_demo_async.py b/examples/text_completions_demo_async.py index 00bc593d9..96d0376ea 100644 --- a/examples/text_completions_demo_async.py +++ b/examples/text_completions_demo_async.py @@ -1,4 +1,4 @@ -#!/usr/bin/env -S poetry run python +#!/usr/bin/env -S uv run python import asyncio diff --git a/examples/text_completions_demo_sync.py b/examples/text_completions_demo_sync.py index 63ca8b59b..907dc46d5 100644 --- a/examples/text_completions_demo_sync.py +++ b/examples/text_completions_demo_sync.py @@ -1,4 +1,4 @@ -#!/usr/bin/env -S poetry run python +#!/usr/bin/env -S uv run python import anthropic from anthropic import Anthropic diff --git a/examples/text_completions_streaming.py b/examples/text_completions_streaming.py index 7b897fcc2..a0095783e 100644 --- a/examples/text_completions_streaming.py +++ b/examples/text_completions_streaming.py @@ -1,4 +1,4 @@ -#!/usr/bin/env -S poetry run python +#!/usr/bin/env -S uv run python import asyncio diff --git a/examples/tools_runner.py b/examples/tools_runner.py index 07a4f2a56..894891a87 100644 --- a/examples/tools_runner.py +++ b/examples/tools_runner.py @@ -44,7 +44,7 @@ def get_weather(location: str, units: Literal["c", "f"]) -> str: def main() -> None: runner = client.beta.messages.tool_runner( max_tokens=1024, - model="claude-3-5-sonnet-latest", + model="claude-sonnet-4-5-20250929", # alternatively, you can use `tools=[anthropic.beta_tool(get_weather)]` tools=[get_weather], messages=[{"role": "user", "content": "What is the weather in SF?"}], diff --git a/examples/workload_identity.py b/examples/workload_identity.py index 5bd2b35ce..4c41a1f2f 100755 --- a/examples/workload_identity.py +++ b/examples/workload_identity.py @@ -169,7 +169,7 @@ async def main() -> None: ), ) msg = await aclient.messages.create( - model="claude-opus-4-5", + model="claude-opus-4-7", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}], )