Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 288
feat(agent): default to message 'ts' when no 'thread_ts' is avaialble for 'agent.chat_stream(...)'#1444
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
Uh oh!
There was an error while loading. Please reload this page.
feat(agent): default to message 'ts' when no 'thread_ts' is avaialble for 'agent.chat_stream(...)' #1444
Changes from all commits
a9566a9956f5f51e1c1672cbb1af38d0c42f2f084e2c664c1e4ed842b77b5a7595a1d7c3a302eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -218,6 +218,9 @@ def extract_thread_ts(payload: Dict[str, Any]) -> Optional[str]: | ||
| # This utility initially supports only the use cases for AI assistants, but it may be fine to add more patterns. | ||
| # That said, note that thread_ts is always required for assistant threads, but it's not for channels. | ||
| # Thus, blindly setting this thread_ts to say utility can break existing apps' behaviors. | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👁️🗨️ thought: I'm surprised that I agree that a "fix" for this, to respond in thread if a Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm good question! id love to hear what changing it in the future would look like 🤔 to me it makes sense for apps to respond in thread MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @srtaalej I'm most interested in the We might find the | ||
| # | ||
| # The BoltAgent class handles non-assistant thread_ts separately by reading from the event directly, | ||
| # allowing it to work correctly without affecting say() behavior. | ||
| if is_assistant_event(payload): | ||
| event = payload["event"] | ||
| if ( | ||
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.
praise: such a clean implementation! 🎉
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.
@mwbrooks Thanks! I'm still keeping a note that we might want to add
tsto context but for now I think this is an alright approach 👾