|
|
@@ -42,7 +42,7 @@ import java.util.Map;
|
|
|
*
|
|
|
* <h3>隔离</h3>
|
|
|
* 磁盘 {@code {root}/chat-attachments/{userId}/{caseId}/{sessionId}/...} + 表级三重归属 +
|
|
|
- * 向量表按案件分表、检索按会话过滤。{@link #loadForSession} 任何一重不匹配直接 400。
|
|
|
+ * 向量表按案件分表、检索按会话过滤。{@link #} 任何一重不匹配直接 400。
|
|
|
*
|
|
|
* @author cc
|
|
|
* @since 2026/9/29
|
|
|
@@ -276,9 +276,9 @@ public class ChatAttachmentService {
|
|
|
sb.append(head).append("(表格, ").append(att.getRowCount()).append(" 行)\n");
|
|
|
sb.append("数据文件路径:").append(dataPath).append('\n');
|
|
|
sb.append("列:").append(att.getFileName()).append(" 的表头见下方样本。\n");
|
|
|
- sb.append("【重要】计算/统计类问题必须用 execute_python 读该文件全量计算(示例:"
|
|
|
- + "import pandas as pd; df = pd.read_csv(r'" + dataPath + "'); ...),"
|
|
|
- + "不要只依据样本行估算");
|
|
|
+ sb.append("【重要】计算/统计类问题必须用 execute_python 读该文件全量计算(示例:" + "import pandas as pd; df = pd.read_csv(r'")
|
|
|
+ .append(dataPath).append("'); ...),")
|
|
|
+ .append("不要只依据样本行估算");
|
|
|
if (att.getSidecarPath() != null && !att.getSidecarPath().equals(att.getFilePath())) {
|
|
|
sb.append("(已转为 UTF-8 csv,直接 read_csv 即可)");
|
|
|
}
|
|
|
@@ -329,7 +329,7 @@ public class ChatAttachmentService {
|
|
|
private static String buildSheetMarkdown(AttachmentSheetScanner.SheetScan scan, int maxRows) {
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
sb.append("| ").append(String.join(" | ", scan.headers())).append(" |\n");
|
|
|
- sb.append("|").append("---|".repeat(Math.max(1, scan.headers().size()))).append('\n');
|
|
|
+ sb.append("|").repeat("---|", Math.max(1, scan.headers().size())).append('\n');
|
|
|
for (List<String> row : scan.samples().stream().limit(maxRows).toList()) {
|
|
|
sb.append("| ");
|
|
|
for (int i = 0; i < scan.headers().size(); i++) {
|