MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / async_stream_generator

Method async_stream_generator

api/dashscope_client.py:519–528  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

517 if api_kwargs.get("stream", False):
518
519 async def async_stream_generator():
520 async for chunk in completion:
521 log.debug(f"Raw async chunk completion: {chunk}")
522 try:
523 parsed_content = parse_stream_response(chunk)
524 except Exception as e:
525 log.error(f"Error parsing async stream chunk: {e}")
526 parsed_content = None
527 if parsed_content:
528 yield parsed_content
529
530 return async_stream_generator()
531 else:

Callers

nothing calls this directly

Calls 1

parse_stream_responseFunction · 0.70

Tested by

no test coverage detected