How to use Server Sent Events with HttpClient
I'm working with an API framework (https://docs.mistral.ai/api/#operation/createChatCompletion) in which you send a chat request. If you set the stream parameter to true:
To handle this, I created an SssEvent class with the following properties:
I have the code working for non-streaming calls, but I'm confused as to how to send my initial message and then stream back the response. My code currently looks like this:
https://paste.mozilla.org/BD3gMX5o
To handle this, I created an SssEvent class with the following properties:
I have the code working for non-streaming calls, but I'm confused as to how to send my initial message and then stream back the response. My code currently looks like this:
https://paste.mozilla.org/BD3gMX5o