Repository navigation
fix(converter): 输出截断最多重试 1 次,避免按 4 倍计费 (#96) - #98
Merged
Merged
Conversation
截断的错误文案含 "LLM",被归为普通 LLM 错误,按 maxRetries 最多请求 4 次, 而每次都要全额付费。总是截断的页面费用变成 4 倍,最后仍然失败。 - 新增 OutputTruncatedError 和 TRUNCATION_ERROR,按类型而非文案识别, 不会误伤图片损坏时的 "The image file is truncated" - 新增配置 converter.maxTruncationRetries = 1,按页统计截断次数,与 attempt 分开:其他错误既不占用也不增加这个额度,其重试次数不变 - 文案从 "Try again" 改为提示换用输出上限更高的模型
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.
Fixes #96
OutputTruncatedError/ErrorType.TRUNCATION_ERROR,按类型(非文案)识别截断。converter.maxTruncationRetries: 1:截断最多请求 2 次;第 1 次截断、第 2 次正常仍成功。maxRetries、退避和分类不变(测试覆盖 8 种错误类型)。