MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / text

Method text

src/opencode_ai/_response.py:334–337  ·  view source on GitHub ↗

Read and decode the response content into a string.

(self)

Source from the content-addressed store, hash-verified

332 raise StreamAlreadyConsumed() from exc
333
334 def text(self) -> str:
335 """Read and decode the response content into a string."""
336 self.read()
337 return self.http_response.text
338
339 def json(self) -> object:
340 """Read and decode the JSON response content."""

Callers 6

test_method_textMethod · 0.45
test_method_textMethod · 0.45

Calls 1

readMethod · 0.95

Tested by 6

test_method_textMethod · 0.36
test_method_textMethod · 0.36