← 返回
未分类 中文

Truncated Output

The reply ends mid-sentence or mid-code-block because the model hit a token limit or was cut short.
回复在句子或代码块中途结束,因模型达到 token 限制或被截断。
mvogt99
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 324
下载
💾 0
安装
1
版本
#latest

概述

truncated-output

The reply the user receives is incomplete — the model ran out of tokens, the stream was cancelled, or a code fence opened without closing.

Symptoms

  • Reply ends without terminal punctuation and reads as if more was coming.
  • A fenced code block is open (``` ` ```) with no matching close.
  • Enumerated lists or steps trail off before the final item.
  • Provider metadata reports finish_reason: "length" or stop_reason: "max_tokens".

What to do

  • Before returning the reply, check for an unmatched code fence. If present, the reply is incomplete — do not ship it.
  • Check the provider's finish reason. If it indicates a length cap, regenerate with a higher max_tokens budget or summarize the remaining work inline.
  • Watch context budget. If the prompt is already close to the context ceiling, the reply has no room — trim context before retrying, don't just raise the cap.
  • If truncation happens repeatedly on the same task, break the task into smaller turns instead of asking for one giant reply.
  • When truncation cannot be avoided (e.g., streaming to a channel with its own cap), surface the incompleteness to the user explicitly rather than pretending the reply is done.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 01:40 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Race Condition

mvogt99
共享可变状态在并发环境中未同步访问,导致不确定行为。
★ 0 📥 338

Analysis Missing Tradeoffs

mvogt99
分析仅呈现单一选项,未比较替代方案,也未说明所选方案的成本。
★ 0 📥 607

Hallucinated Paths

mvogt99
回复引用了当前项目中不存在的文件路径、目录或模块位置。
★ 0 📥 343