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

Method respond

tests/test_open_telemetry.py:4205–4208  ·  view source on GitHub ↗
(_request: httpx2.Request)

Source from the content-addressed store, hash-verified

4203 current: list[trace.SpanContext] = []
4204
4205 def respond(_request: httpx2.Request) -> httpx2.Response:
4206 # What instrumentation of the HTTP client makes the parent of its own span.
4207 current.append(trace.get_current_span().get_span_context())
4208 return httpx2.Response(500, json={}) if len(current) == 1 else httpx2.Response(200, json=MESSAGE)
4209
4210 route = respx_mock.post("/v1/messages").mock(side_effect=respond)
4211 make: Callable[..., Any] = make_client if sync else make_async_client

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected