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

Function _result_text

tests/lib/tools/test_session_runner.py:137–139  ·  view source on GitHub ↗

Concatenated text of the posted-back result's text blocks.

(item: DispatchedToolCall)

Source from the content-addressed store, hash-verified

135
136
137def _result_text(item: DispatchedToolCall) -> str:
138 """Concatenated text of the posted-back result's text blocks."""
139 return "".join(b.get("text", "") for b in _result_content(item) if b.get("type") == "text")
140
141
142def _api_status_error(code: int) -> APIStatusError:

Calls 2

_result_contentFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected