MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / iter_content

Method iter_content

tests/test_oauth_codex.py:238–243  ·  view source on GitHub ↗
(self, chunk_size=8192, decode_unicode=True)

Source from the content-addressed store, hash-verified

236 encoding = "utf-8"
237
238 def iter_content(self, chunk_size=8192, decode_unicode=True):
239 del chunk_size, decode_unicode
240 yield b'data: {"choices":[{"delta":{"content":"Hel"}}]}\n\n'
241 yield b'data: {"choices":[{"delta":{"content":"lo"}}]}\n\n'
242 yield b'event: response.completed\ndata: {"response":{"output":[]}}\n\n'
243 yield b"data: [DONE]\n\n"
244
245 assert codex.collect_completed_response(FakeResponse()) == {"output": [], "output_text": "Hello"}
246

Callers 3

iter_sse_eventsFunction · 0.45
_stream_upstream_sseFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected