| | |
| | | //return result.getOutput().getChoices().get(0).getMessage().getContent();
|
| | |
|
| | | tranReq.sendChunkedBlock("begin_stream", "");
|
| | | tranReq. sendChunkedBlock("send_stream", "开始分析:\n");
|
| | | String[] fullContent = new String[] {""};
|
| | | Flowable<GenerationResult> result = _gen.streamCall(param);
|
| | | result.blockingForEach(message -> {
|
| | |
| | | return;
|
| | |
|
| | | fullContent[0] = content;
|
| | | tranReq.sendChunkedBlock("send_stream", content.substring(size));
|
| | | tranReq.sendChunkedStreamBlock(content.substring(size));
|
| | | });
|
| | | tranReq.sendChunkedBlock("end_stream", "");
|
| | | return fullContent[0];
|