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

Function call_client

tests/test_open_telemetry.py:2904–2908  ·  view source on GitHub ↗

What `invoke` returns for a client of `spans`: the synchronous one, or else the asynchronous one, awaited.

(sync: bool, spans: Spans, invoke: Callable[[Any], Any], **options: Any)

Source from the content-addressed store, hash-verified

2902
2903
2904async def call_client(sync: bool, spans: Spans, invoke: Callable[[Any], Any], **options: Any) -> Any:
2905 """What `invoke` returns for a client of `spans`: the synchronous one, or else the asynchronous one, awaited."""
2906 if sync:
2907 return invoke(make_client(spans, **options))
2908 return await invoke(make_async_client(spans, **options))
2909
2910
2911SYNC_AND_ASYNC = pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])

Calls 2

make_clientFunction · 0.70
make_async_clientFunction · 0.70

Tested by

no test coverage detected