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

Function handle_streaming_response

api/dashscope_client.py:96–101  ·  view source on GitHub ↗

Handle the streaming response.

(generator: Stream[ChatCompletionChunk])

Source from the content-addressed store, hash-verified

94
95
96def handle_streaming_response(generator: Stream[ChatCompletionChunk]):
97 """Handle the streaming response."""
98 for completion in generator:
99 log.debug(f"Raw chunk completion: {completion}")
100 parsed_content = parse_stream_response(completion)
101 yield parsed_content
102
103
104class DashscopeClient(ModelClient):

Callers 1

callMethod · 0.70

Calls 1

parse_stream_responseFunction · 0.70

Tested by

no test coverage detected