FIx:简单修复因用户手动中断请求后,之后的所有回复错位的问题.#115
Merged
CJackHwang merged 2 commits intoCJackHwang:devfrom May 29, 2025
NyxJae:dev
Merged
Conversation
Contributor
Author
Owner
|
辛苦了 |
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.


简单修复因用户手动中断请求后,之后的所有回复错位的问题.
方案:
在释放处理锁之前,此时如果队列中有数据的话,肯定是不要的,就全消耗掉.
server.py:1734-1737
简单的清理函数
server.py:1807-1818
问题:
现在用户手动中断,流式其实会走到超时处理那里,将上个提交随便写的但太长的阈值从1500回调到300
server.py:1800-1804
但其实应该按照群里大佬说的,如果用户取消任务,流式也应该停.
然后UI应该点击停止按钮,停止AI回复.再消耗掉多余的流式数据.
但先简单处理下,等群主定夺最终方案,群主还得重构server.py不是,就先不给server.py添砖加瓦了(懒).