Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ will result in the client terminating the connection and retrying without receiv

We set a [TCP socket keep-alive](https://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html) option in order
to reduce the impact of idle connection timeouts on some networks.
This can be [overriden](#Configuring-the-HTTP-client) by passing a `http_client` option to the client.
This can be [overridden](#Configuring-the-HTTP-client) by passing a `http_client` option to the client.

## Default Headers

Expand Down
6 changes: 3 additions & 3 deletions tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ The `@beta_tool` decorator will inspect the function arguments and the docstring
}
```

If you want to implement calling the tool yourself, you can then pass the to the API like so:
If you want to implement calling the tool yourself, you can then pass it to the API like so:

```python
message = client.beta.messages.create(
tools=[get_weather.to_dict()],
tools=[sum.to_dict()],
# ...
max_tokens=1024,
model="claude-sonnet-4-5-20250929",
Expand All @@ -63,7 +63,7 @@ or you can use our [tool runner](#tool-runner)!

## Tool runner

We provide a `client.beta.messages.tool_runner()` method that can automatically call tools defined with `@beta_tool()`. This method returns a `BetaToolRunner` class that is an iterator where each iteration yields a new `BetaMessage` instance from an API call, iteration will stop when there no tool call content blocks.
We provide a `client.beta.messages.tool_runner()` method that can automatically call tools defined with `@beta_tool()`. This method returns a `BetaToolRunner` class that is an iterator where each iteration yields a new `BetaMessage` instance from an API call, iteration will stop when there are no tool call content blocks.

```py
runner = client.beta.messages.tool_runner(
Expand Down