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