MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / async_run

Function async_run

tests/lib/tools/test_open_telemetry.py:198–205  ·  view source on GitHub ↗
(client: AsyncAnthropic, **kwargs: Any)

Source from the content-addressed store, hash-verified

196
197
198def async_run(client: AsyncAnthropic, **kwargs: Any) -> Any:
199 return cast(Any, client.beta.messages).tool_runner(
200 max_tokens=1024,
201 model="claude-test",
202 tools=[beta_async_tool(async_get_weather, name="get_weather")],
203 messages=[{"role": "user", "content": "What is the weather in SF?"}],
204 **kwargs,
205 )
206
207
208def instrument(monkeypatch: pytest.MonkeyPatch, spans: Spans, runner: object, method: str) -> None:

Calls 2

beta_async_toolFunction · 0.90
tool_runnerMethod · 0.45

Tested by

no test coverage detected