feat(agent): add set_suggested_prompts helper#1442
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1442 +/- ##
==========================================
+ Coverage 90.64% 90.66% +0.01%
==========================================
Files 226 226
Lines 7187 7201 +14
==========================================
+ Hits 6515 6529 +14
Misses 672 672 ☔ View full report in Codecov by Sentry. |
srtaalej
left a comment
There was a problem hiding this comment.
Looks great 🤩 lets get this merged 😝
mwbrooks
left a comment
There was a problem hiding this comment.
question: @zimeg Can you explain in more detail what you mean by:
This mirrors an implementation found in context at the moment - I'm uncertain if duplicating this logic is best or what our longterm strategies are for these callsites with assistant classes:
Are you saying that any in production today, any event listener can access context.set_suggested_prompts(...)?
|
@mwbrooks Correct! The current bolt-python/slack_bolt/context/context.py Lines 199 to 201 in cd52d19 bolt-python/slack_bolt/app/app.py Lines 1401 to 1413 in cd52d19 IMHO this is somewhat confusing but I'm hoping we can move toward a single approach for this? |
|
@zimeg Ah, thanks for the clarity. It is a little confusing why |
| *, | ||
| prompts: Sequence[Union[str, Dict[str, str]]], | ||
| title: Optional[str] = None, | ||
| channel: Optional[str] = None, |
There was a problem hiding this comment.
📝 note: I'm noticing this is different than the expected API value!
🔗 https://docs.slack.dev/reference/methods/assistant.threads.setSuggestedPrompts/
Summary
This PR adds the
set_suggest_promptshelper to the Boltagentargument 👾Testing
Category
slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsNotes
This mirrors an implementation found in
contextat the moment - I'm uncertain if duplicating this logic is best or what our longterm strategies are for these callsites withassistantclasses:https://github.com/slackapi/bolt-python/tree/main/slack_bolt/context/set_suggested_prompts
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
./scripts/install_all_and_run_tests.shafter making the changes.