Revert Merge Commit#592
Merged
Merged
Conversation
Owner
1. _parse_chapter 异常类型降级(影响:高)
# 回退后(本 PR)
raise ValueError("LLM返回空内容")
raise ValueError("章节JSON缺少chapter字段")
# 回退前(当前 main)
raise ChapterJsonParseError("LLM返回空内容", raw_text=raw_text)
raise ChapterJsonParseError("章节JSON缺少chapter字段或结构不完整", raw_text=cleaned)
ChapterJsonParseError 是 ValueError 的子类。run() 方法中 except ChapterJsonParseError 捕获不到父类 ValueError。当 LLM 返回空内容或 JSON 缺少 chapter
字段时,异常会直接穿透上层所有 except 块,导致整章生成失败且不会进入重试或降级逻辑。
2. agent.py 移除宽泛异常重试(影响:中高)
移除了对 AttributeError, TypeError, KeyError, IndexError, ValueError, json.JSONDecodeError 的捕获重试。如果 LLM 返回畸形 JSON
导致运行时异常,现在会直接崩溃而非重试。
3. 移除非字典 block 防御性处理(影响:中)
chapter_generation_node.py 中 walk() / _merge_fragment_sequences() / _merge_nested_fragments() 里对 LLM 返回非字典类型 block(string、list
等)的容错处理全部移除。如果 LLM 输出异常结构,现在会直接报错而非自动修复。
4. 移除 _normalize_list_type 和表格行溢出修复(影响:低)
- _normalize_list_type():将非法 listType(如 "unordered")自动映射为 "bullet" 的逻辑被移除
- html_renderer.py 的 _fix_nested_table_rows():多行表格数据溢出到单行时的重组逻辑被简化
好像丢失了一些PR的修改,譬如你这次的PR:927c41c 另外gemini-2.5-pro → gemini-3.1-pro-preview 不属于 GraphRAG 回退范畴,改回去。 |
This reverts commit cb642b4.
1. _parse_chapter 异常类型降级(影响:高)
# 回退后(本 PR)
raise ValueError("LLM返回空内容")
raise ValueError("章节JSON缺少chapter字段")
# 回退前(当前 main)
raise ChapterJsonParseError("LLM返回空内容", raw_text=raw_text)
raise ChapterJsonParseError("章节JSON缺少chapter字段或结构不完整", raw_text=cleaned)
ChapterJsonParseError 是 ValueError 的子类。run() 方法中 except ChapterJsonParseError 捕获不到父类 ValueError。当 LLM 返回空内容或 JSON 缺少 chapter
字段时,异常会直接穿透上层所有 except 块,导致整章生成失败且不会进入重试或降级逻辑。
2. agent.py 移除宽泛异常重试(影响:中高)
移除了对 AttributeError, TypeError, KeyError, IndexError, ValueError, json.JSONDecodeError 的捕获重试。如果 LLM 返回畸形 JSON
导致运行时异常,现在会直接崩溃而非重试。
3. 移除非字典 block 防御性处理(影响:中)
chapter_generation_node.py 中 walk() / _merge_fragment_sequences() / _merge_nested_fragments() 里对 LLM 返回非字典类型 block(string、list
等)的容错处理全部移除。如果 LLM 输出异常结构,现在会直接报错而非自动修复。
4. 移除 _normalize_list_type 和表格行溢出修复(影响:低)
- _normalize_list_type():将非法 listType(如 "unordered")自动映射为 "bullet" 的逻辑被移除
- html_renderer.py 的 _fix_nested_table_rows():多行表格数据溢出到单行时的重组逻辑被简化
使用 unicodedata 计算字符串终端显示宽度,替代原来按字符数填充的方式, 正确处理中文、全角标点和 emoji 等宽字符,使提示框右侧 ║ 对齐。 Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 745f597.
Contributor
Author
Owner
|
三个小Bug是啥,整狼人杀是吧,说一下我看看🤣 |
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.