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

Function final_text

tests/test_open_telemetry.py:7948–7954  ·  view source on GitHub ↗

The text that the stream helper of a client of `spans` accumulates.

(sync: bool, spans: Spans, **options: Any)

Source from the content-addressed store, hash-verified

7946
7947
7948async def final_text(sync: bool, spans: Spans, **options: Any) -> str:
7949 """The text that the stream helper of a client of `spans` accumulates."""
7950 if sync:
7951 with make_client(spans, **options).messages.stream(**REQUEST) as stream:
7952 return stream.get_final_text()
7953 async with make_async_client(spans, **options).messages.stream(**REQUEST) as async_stream:
7954 return await async_stream.get_final_text()
7955
7956
7957class TestTracingFailures:

Callers 1

Calls 4

make_clientFunction · 0.70
make_async_clientFunction · 0.70
streamMethod · 0.45
get_final_textMethod · 0.45

Tested by

no test coverage detected