diff --git a/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233703.docx b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233703.docx new file mode 100644 index 00000000..6d256017 Binary files /dev/null and b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233703.docx differ diff --git a/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233855.docx b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233855.docx new file mode 100644 index 00000000..bf13f084 Binary files /dev/null and b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_233855.docx differ diff --git a/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_234130.docx b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_234130.docx new file mode 100644 index 00000000..c6cf8cba Binary files /dev/null and b/WebRoot/upload/文山州与楚雄州_教育分析报告_20250613_234130.docx differ diff --git a/src/main/java/com/dsideal/base/Util/CallDeepSeek.java b/src/main/java/com/dsideal/base/Util/CallDeepSeek.java index 9dae27a8..bde0f252 100644 --- a/src/main/java/com/dsideal/base/Util/CallDeepSeek.java +++ b/src/main/java/com/dsideal/base/Util/CallDeepSeek.java @@ -142,19 +142,21 @@ public class CallDeepSeek { } } else { System.out.println("收到结束标记 [DONE]"); + // 收到[DONE]标记,流处理完成 + String responseContent = fullResponse.toString(); + System.out.println("流处理完成,总内容长度: " + responseContent.length()); + if (saveToFile && outputPath != null) { + FileUtil.writeString(responseContent, new File(outputPath), "UTF-8"); + listener.onComplete("内容已成功保存到" + outputPath); + } else { + listener.onComplete(responseContent); + } + return; // 提前结束处理 } } }); - // 流结束后的处理 - String responseContent = fullResponse.toString(); - System.out.println("流处理完成,总内容长度: " + responseContent.length()); - if (saveToFile && outputPath != null) { - FileUtil.writeString(responseContent, new File(outputPath), "UTF-8"); - listener.onComplete("内容已成功保存到" + outputPath); - } else { - listener.onComplete(responseContent); - } + System.out.println("SSE数据流处理结束"); } else { System.err.println("API请求失败,状态码: " + response.statusCode()); listener.onError("API请求失败: " + response.statusCode() + " Body: " + response.body().toString());