-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: 修复 Telegram 下多模态消息触发策略问题 #1480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated TelegramAdapter to support both text and caption messages, improving message processing capabilities. - Modified message_rules to check for TextMessage instances when matching prefixes, enhancing rule accuracy. - Improved WorkflowExecutor to handle negative timeout values gracefully, ensuring robust execution management.
Original review guide in EnglishReviewer's GuideThis pull request modifies the Telegram message adapter to correctly handle multimodal messages (text with media/captions) and updates the prefix matching rule to work with these messages. It also simplifies the workflow execution timeout logic. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #1480 +/- ##
==========================================
- Coverage 61.11% 61.09% -0.02%
==========================================
Files 168 168
Lines 9243 9246 +3
==========================================
Hits 5649 5649
- Misses 3594 3597 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嘿 @lss233 - 我已经查看了你的更改 - 这里有一些反馈:
- 考虑一下
PrefixRule是否应该只在第一个TextMessage元素以该前缀开头时匹配,而不是消息中的任何TextMessage元素。 - 验证
executor.py中更新的超时逻辑是否根据预期行为正确处理max_execution_time值为 0 和负数的情况(立即超时与无超时)。
以下是我在审查期间查看的内容
- 🟡 General issues: 发现 1 个问题
- 🟢 Security: 一切看起来都很好
- 🟢 Testing: 一切看起来都很好
- 🟢 Complexity: 一切看起来都很好
- 🟢 Documentation: 一切看起来都很好
请帮助我变得更有用!请点击每个评论上的 👍 或 👎,我将使用这些反馈来改进你的评论。
Original comment in English
Hey @lss233 - I've reviewed your changes - here's some feedback:
- Consider if the
PrefixRuleshould only match if the firstTextMessageelement starts with the prefix, rather than anyTextMessageelement within the message. - Verify that the updated timeout logic in
executor.pycorrectly handlesmax_execution_timevalues of 0 and negative numbers according to the intended behavior (immediate timeout vs. no timeout).
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
MyPy 类型检查通过 ✅PR 修改的代码行通过了类型检查。 |
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
- Modified the timeout condition in WorkflowExecutor to allow for zero or negative values, ensuring no execution time limit is enforced in such cases. This change improves the robustness of workflow execution management.
fixes #1469
好的,这是翻译成中文的 pull request 总结:
Sourcery 总结
修复 Telegram 多模态消息处理和工作流执行超时问题
Bug 修复:
增强功能:
Original summary in English
Summary by Sourcery
Fix Telegram multi-modal message handling and workflow execution timeout issues
Bug Fixes:
Enhancements: