chat.stopStream method
Usage info
Use the chat.stopStream method to end a streaming conversation initiated with the chat.startStream method.
The Python Slack SDK and Node Slack SDK both provide a helper utility for the chat.*Stream methods that are surfaced in Bolt for Python and Bolt for JavaScript.
Using the chunks parameter
The chunks parameter can include markdown text chunk objects, task update chunk objects, or plan update chunks.
markdown_text chunks
The markdown_text chunk is used for streaming text content with markdown formatting support.
{
"type": "markdown_text",
"text": "We love Sandra"
}
task_update chunks
The
task_update chunk object looks mighty similar to the task card block!The task_update chunk is used for displaying task progress in a timeline-style UI.
{
"type": "task_update",
"id": "unique_task_id",
"title": "Remind Sandra how amazing she is",
"status": "pending" | "in_progress" | "complete" | "error",
"details": "wow such good details",
"output": "amazing output here",
"sources": [
{
"type": "url",
"text": "Example.com",
"url": "https://example.com"
}
]
}
plan_update chunks
The plan_update chunk is used for updating the title of a plan.
{
"type": "plan_update",
"title": "Sandra's new and improved plan"
}