(
client: AsyncAnthropic,
*,
context_management: Union[BetaContextManagementConfigParam, Omit] = omit,
max_iterations: Union[int, Omit] = omit,
thread: Union[Literal[False], Omit] = omit,
)
| 2550 | |
| 2551 | |
| 2552 | def _async_compact_runner( |
| 2553 | client: AsyncAnthropic, |
| 2554 | *, |
| 2555 | context_management: Union[BetaContextManagementConfigParam, Omit] = omit, |
| 2556 | max_iterations: Union[int, Omit] = omit, |
| 2557 | thread: Union[Literal[False], Omit] = omit, |
| 2558 | ) -> BetaAsyncToolRunner[None]: |
| 2559 | return client.beta.messages.tool_runner( |
| 2560 | thread=thread, |
| 2561 | max_tokens=1024, |
| 2562 | model="claude-haiku-4-5", |
| 2563 | tools=[_async_weather_tool()], |
| 2564 | messages=[{"role": "user", "content": "What is the weather in SF?"}], |
| 2565 | context_management=context_management, |
| 2566 | max_iterations=max_iterations, |
| 2567 | ) |
| 2568 | |
| 2569 | |
| 2570 | def _current_messages(runner: Union[BetaToolRunner[None], BetaAsyncToolRunner[None]]) -> List[Any]: |
no test coverage detected