()
| 62 | |
| 63 | |
| 64 | def main() -> None: |
| 65 | tools: list[BetaFunctionTool[Any]] = [ |
| 66 | get_weather, |
| 67 | # ... many more tools |
| 68 | ] |
| 69 | runner = client.beta.messages.tool_runner( |
| 70 | max_tokens=1024, |
| 71 | model="claude-sonnet-5", |
| 72 | tools=[*tools, make_tool_searcher(tools)], |
| 73 | messages=[{"role": "user", "content": "What is the weather in SF?"}], |
| 74 | betas=["tool-search-tool-2025-10-19"], |
| 75 | ) |
| 76 | for message in runner: |
| 77 | rich.print(message) |
| 78 | |
| 79 | |
| 80 | main() |
no test coverage detected