an9xyz

Results 4 comments of an9xyz

> @phazei Another way to use this in spring looks like this: > > ``` > @GetMapping("/") > @Streaming > public ResponseEntity stream() { > StreamingResponseBody responseBody = response ->...

My point is to use the OpenAI example -> 3. How much time is saved by streaming a chat completion([Link](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb)) An example of using the Python library requests is as...

> @an9xyz The example code I provided is using GetMapping annotation, because the EventSource Browser API only supports GET requests and I am using the servlet endpoint with javascript EventSource....

@n3bul4 what I want to achieve is to encapsulate the OpenAI interface and provide a public service internally. Your example code works well for local debugging with streaming response, but...