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

Function call

tests/test_tracing.py:149–155  ·  view source on GitHub ↗

Makes a request the way an SDK method does, which names its span.

(client: Client, **options: Any)

Source from the content-addressed store, hash-verified

147
148
149async def call(client: Client, **options: Any) -> None:
150 """Makes a request the way an SDK method does, which names its span."""
151 request_options = make_request_options(span_name="test", **options)
152 if isinstance(client, Anthropic):
153 client.get("/foo", cast_to=httpx2.Response, options=request_options)
154 else:
155 await client.get("/foo", cast_to=httpx2.Response, options=request_options)
156
157
158@pytest.fixture

Calls 2

make_request_optionsFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected