35 String response = currentResponsePart.getResponse();
36 String thinking = currentResponsePart.getThinking();
38 boolean hasResponse = response !=
null && !response.isEmpty();
39 boolean hasThinking = thinking !=
null && !thinking.isEmpty();
41 if (!hasResponse && hasThinking && thinkingStreamHandler !=
null) {
42 thinkingStreamHandler.
accept(thinking);
43 }
else if (hasResponse && responseStreamHandler !=
null) {
44 responseStreamHandler.
accept(response);