With my Blazor application, I am hitting a REST API endpoint that produces both streaming and non-streaming results, depending on the endpoint I hit. The non-streaming endpoint is just standard JSON:
{"key":"value", ...}Which I have no problem processing to the Blazor front-end.
However, the streaming is not standard JSON, and looks like this:
data: {"key":"value", ..."data_complete_token":false}data: {"key":"value", ..."data_complete_token":false}data: {"key":"value", ..."data_complete_token":false}...data: {"last_key":"last_value", ..."data_complete_token":true}After many Google searches, I believe the data coming from the streaming endpont is called a "streaming response" or "chunked response".
I have done some Google searches using these parameters:
how to read data from rest api streaming response with blazor server -WebAssembly
And I seem to still get results for WebAssembly and not many for server-side. Those that are for server-side don't seem to be what I am looking for.
EDIT:
To clarify what I am doing, I am hitting a Mixtral LLM endpoint which "streams" it's responses one word at a time.