多模态投递定案:探针矩阵证伪「每轮一张」限流与外链嫌疑,合并消息按官方形态收敛——DeepSeek 视觉受控实验(纯色条 ground-truth 图 × prompt_tokens 差值 × /p 外部取用日志,三源交叉):data URL 单/双图、/p 外链单/双图(自签 https+attachment 头)、tool 回执后 user 合并形态、真实微信截图逐字 OCR,9 项全 PASS;生产 DB usage.pt 实测每图轮 +600~1000——14:33 时图早已进入上下文,"看不见"是弱模型叙事惯性而非投递失败。据此采纳评审可落地三条:llm.js 合并 user 消息改 text 置顶排布(逐图对应说明合并进首段文字、图块按回执顺序紧随,对齐官方示例形态),首段明说「不是用户新输入」并附「先逐张简述再继续」指令兼作送达自检;"已消费"分界从任意 assistant 收紧为最后一条无 tool_calls 的收尾 assistant(中间只发 tool_calls 的轮次不算已阅,图继续留在上下文直到模型真正答复过,鲁棒优先于极致省 token)。engine.js 撤 imgThisTurn 每轮一张批次限流(多图实测可行,该限流是为误诊买的保险),保留同回合同图去重护栏(本轮实测 11:51 式 40 连读已收敛为 1 次挡回+如实上报);「发送形态」debug 日志转常驻观测。definitions.json read_file 图片段与 ARCHITECTURE 图片链路、陷阱 7 同步(含诊断三源方法论:发送形态日志/外部取用行/pt 增量)。探针实验产物已全部清理;docker-compose.yml 为用户自改不在本次提交。
This commit is contained in:
@@ -202,7 +202,7 @@
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "read_file",
|
||||
"description": "Reads the content of a file.\n\nText files: each returned line is prefixed with a line number right-aligned in a 6-character field, followed by a tab, then the line content.\n\nLarge text files (roughly over 16 KB) are not returned in full: you get an outline listing top-level symbols (or Markdown headings) with line numbers instead. The outline IS a successful response — do NOT retry the same call without a line range; use the outline line numbers with `start_line` / `end_line` to read specific sections. If no outline can be extracted, a first-1KB excerpt is returned instead. Supplying `start_line` or `end_line` disables outline mode.\n\nImage files (PNG, JPEG, WebP, GIF, BMP, TIFF) are returned as visual content you can analyze directly, but only if the current model supports vision; otherwise a text placeholder is returned — that placeholder is not an error. The tool result itself carries a text notice only; the actual image pixels arrive in a separate user message right after the batch of tool results, each image preceded by a label naming the read_file result it belongs to. At most ONE image arrives per round: when several images are read in one batch only the first carries pixels and the rest come back as text asking you to read_file them individually next round — so read images one at a time when you need several, never re-read an image already delivered in this turn, and if pixels never arrive tell the user instead of retrying. Very large images (roughly over 50 MB) are skipped, and images may be downscaled (long edge ~2000 px, re-encoded as JPEG) before being returned.\n\nBinary files are not returned as text; a short notice is returned instead. Text files over 32 MB cannot be read by this tool — use `terminal` (grep -n / head / sed -n).",
|
||||
"description": "Reads the content of a file.\n\nText files: each returned line is prefixed with a line number right-aligned in a 6-character field, followed by a tab, then the line content.\n\nLarge text files (roughly over 16 KB) are not returned in full: you get an outline listing top-level symbols (or Markdown headings) with line numbers instead. The outline IS a successful response — do NOT retry the same call without a line range; use the outline line numbers with `start_line` / `end_line` to read specific sections. If no outline can be extracted, a first-1KB excerpt is returned instead. Supplying `start_line` or `end_line` disables outline mode.\n\nImage files (PNG, JPEG, WebP, GIF, BMP, TIFF) are returned as visual content you can analyze directly, but only if the current model supports vision; otherwise a text placeholder is returned — that placeholder is not an error. The tool result itself carries a text notice only; the actual image pixels arrive in a separate user message right after the batch of tool results: that message lists per-image labels matching each image to its read_file receipt, then the image blocks in receipt order, and asks you to briefly describe each image before continuing. Never re-read an image already delivered in the current turn; if pixels never arrive, tell the user instead of retrying. Very large images (roughly over 50 MB) are skipped, and images may be downscaled (long edge ~2000 px, re-encoded as JPEG) before being returned.\n\nBinary files are not returned as text; a short notice is returned instead. Text files over 32 MB cannot be read by this tool — use `terminal` (grep -n / head / sed -n).",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user