Update file .gitignore so we can check-in the file extra/test-server/Properties/launchSettings.json which (among other things) defines the port.
When we stream a response to the client, use application/x-ndjson instead of text/event-stream as the Content-Type.
When we stream a response to the client, do not fill in empty 'Role' fields in the chunks based on what we saw in the first chunk. Just pass through whatever value (if exits) comes from the back-end service.
Add some checks for missing input argument(s) to the two extra/test-server/example-xxx-yyy.cmd scripts
I saw that we had a duplication of "session_state" in the response, for both streaming and none-streaming. Remove the duplication. You will now find "session_state" next to "context". For example, for non-streaming this would be a JSON response:
{"message":{"content":" Sure, I can help you with that!\n\nThere are 5,280 feet in a mile.","role":"assistant"},"context":null,"session_state":null,"finish_reason":"stop"}
And for streaming, the first two delta JSON lines may look like this:
Everything to do with "Context" and "SessionState" needs to be spec'd out, implemented and tested. I'm leaving this aside for now. Here I just removed the duplication of session state, assuming I now have the correct location. To discuss: in streaming response, are session state and context only expected in the first chunk?
.gitignore
so we can check-in the file extra/test-server/Properties/launchSettings.json which (among other things) defines the port.application/x-ndjson
instead oftext/event-stream
as the Content-Type.{"message":{"content":" Sure, I can help you with that!\n\nThere are 5,280 feet in a mile.","role":"assistant"},"context":null,"session_state":null,"finish_reason":"stop"}
And for streaming, the first two delta JSON lines may look like this:{"delta":{"content":null,"role":"assistant"},"context":null,"session_state":null,"finish_reason":null}
{"delta":{"content":"Sure","role":null},"context":null,"session_state":null,"finish_reason":null}
Everything to do with "Context" and "SessionState" needs to be spec'd out, implemented and tested. I'm leaving this aside for now. Here I just removed the duplication of session state, assuming I now have the correct location. To discuss: in streaming response, are session state and context only expected in the first chunk?