-
Notifications
You must be signed in to change notification settings - Fork 284
docs: add say_stream notes to the sending messages page #1463
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,37 +43,64 @@ def show_datepicker(event, say): | |||||
|
|
||||||
| ## Streaming messages {#streaming-messages} | ||||||
|
|
||||||
| You can have your app's messages stream in to replicate conventional AI chatbot behavior. This is done through three Web API methods: | ||||||
| You can have your app's messages stream in to replicate conventional agent behavior. This is done through three Web API methods: | ||||||
|
|
||||||
| * [`chat_startStream`](/reference/methods/chat.startStream) | ||||||
| * [`chat_appendStream`](/reference/methods/chat.appendStream) | ||||||
| * [`chat_stopStream`](/reference/methods/chat.stopStream) | ||||||
|
||||||
|
|
||||||
| The Python Slack SDK provides a [`chat_stream()`](https://docs.slack.dev/tools/python-slack-sdk/reference/web/client.html#slack_sdk.web.client.WebClient.chat_stream) helper utility to streamline calling these methods. Here's an excerpt from our [Assistant template app](https://github.com/slack-samples/bolt-python-assistant-template): | ||||||
| Bolt for Python provides a `say_stream` listener argument available on `app.event` and `app.message` listeners. | ||||||
|
||||||
| Bolt for Python provides a `say_stream` listener argument available on `app.event` and `app.message` listeners. | |
| Bolt for Python provides a `say_stream` utility as a listener argument for `app.event` and `app.message` listeners. |
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.
nit: i feel like this can be clearer
| If neither a `channel_id` or `thread_ts` can be sourced, then the utility will merely be `None`. | |
| If neither a `channel_id` or `thread_ts` can be sourced, then the utility will just be `None`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,4 +31,4 @@ def handle_mention(agent: BoltAgent): | |
|
|
||
| ### Limitations | ||
|
|
||
| The `chat_stream()` method currently only works when the `thread_ts` field is available in the event context (DMs and threaded replies). Top-level channel messages do not have a `thread_ts` field, and the `ts` field is not yet provided to `BoltAgent`. | ||
| The `chat_stream()` method currently only works when the `thread_ts` field is available in the event context (DMs and threaded replies). Top-level channel messages do not have a `thread_ts` field, and the `ts` field is not yet provided to `BoltAgent`. | ||
|
||
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.
this was my bad; should've been a page from the beginning