Replies: 5 comments 2 replies
-
Hi @cato-dll, how is the client of your spring boot app handles the stream? Do you use SSE? |
Beta Was this translation helpful? Give feedback.
-
Hi @cato-dll , the solution that works for me is:
Credit: https://dzone.com/articles/ai-in-java-building-a-chatgpt-clone-with-spring-bo |
Beta Was this translation helpful? Give feedback.
-
Here's a paraphrased version of what i'm using (note: a stripped out a bunch of propriety stuff related to pre and post processing, but hope this will give you a sense of what works for me). No idea how it compares to @fethullahmisir implementation in terms of robustness and reliability. It's definitely more verbose :).
|
Beta Was this translation helpful? Give feedback.
-
Hey @cato-dll just a minor thing I've noticed: you do not need to create the model (client) on each call |
Beta Was this translation helpful? Give feedback.
-
I gave up on
|
Beta Was this translation helpful? Give feedback.
-
I am trying to leverage the StreamingResponseHandler to return a response from my Springboot application.
The sample works great returning the tokens to the console via System.out.println -- but I haven't been able to get the response to return through my chatbot controller.
I have tried Flux and ResponseEntity without any luck.
Does anyone have a suggestion to get:
@Override public void onNext(String token) { System.out.print(token); }
to actually return the stream through a controller?
Beta Was this translation helpful? Give feedback.
All reactions