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

Function parse_stream_response

api/dashscope_client.py:91–93  ·  view source on GitHub ↗

Parse the response of the stream API.

(completion: ChatCompletionChunk)

Source from the content-addressed store, hash-verified

89
90
91def parse_stream_response(completion: ChatCompletionChunk) -> str:
92 """Parse the response of the stream API."""
93 return completion.choices[0].delta.content
94
95
96def handle_streaming_response(generator: Stream[ChatCompletionChunk]):

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected