How to stream a chat completion (cont.)
The reply can be extracted with response['choices'][0]['message'].

The content of the reply can be extracted with response['choices'][0]['message']['content'].

reply = response['choices'][0]['message']
print(f"Extracted reply: 
{reply}")

reply_content = response['choices'][0]['message']['content']
print(f"Extracted content: 
{reply_content}")