Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Dec 18, 2025

Type of change

  • New feature

Summary

This PR showcases "chunks" in a chat stream. The example is meant to be quick to understand but perhaps not so meaningful. Related: slackapi/python-slack-sdk#1809

Requirements

  • I have ensured the changes I am contributing align with existing patterns and have tested and linted my code
  • I've read and agree to the Code of Conduct

@zimeg zimeg requested review from mwbrooks and srtaalej December 18, 2025 00:09
@zimeg zimeg self-assigned this Dec 18, 2025
@zimeg zimeg added the enhancement New feature or request label Dec 18, 2025
@zimeg zimeg marked this pull request as draft December 18, 2025 00:09
Comment on lines +72 to +113
# The second example shows detailed thinking steps similar to tool calls
else:
streamer.append(
chunks=[
MarkdownTextChunk(
text="Hello.\nI have received the task. ",
),
MarkdownTextChunk(
text="This task appears manageable.\nThat is good.",
),
TaskUpdateChunk(
id="001",
title="Understanding the task...",
status="in_progress",
details="- Identifying the goal\n- Identifying constraints",
),
TaskUpdateChunk(
id="002",
title="Performing acrobatics...",
status="pending",
),
],
)
time.sleep(4)

streamer.append(
chunks=[
TaskUpdateChunk(
id="001",
title="Understanding the task...",
status="complete",
details="\n- Pretending this was obvious",
output="We'll continue to ramble now",
),
TaskUpdateChunk(
id="002",
title="Performing acrobatics...",
status="in_progress",
),
],
)
time.sleep(4)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I've been experimenting with something similar on my own, I like this idea. Featuring what is the agent doing is great like (tools calls or thinking steps)

)

returned_message = call_llm([{"role": "user", "content": text}])
returned_message = call_llm(text)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants