Skip to content
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

Fix streaming in distributed group chat example #5336

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MohMaz
Copy link
Contributor

@MohMaz MohMaz commented Feb 3, 2025

Why are these changes needed?

Recreates #4440 to support actual streaming in core_distributed-group-chat sample

Related issue number

Checks

@MohMaz MohMaz force-pushed the fix-streaming-in-distributed-group-chat-example branch from 2ee11d9 to 7ea6b02 Compare February 3, 2025 08:43
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.02%. Comparing base (5df5bde) to head (2cfabaa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5336   +/-   ##
=======================================
  Coverage   76.02%   76.02%           
=======================================
  Files         157      157           
  Lines        9491     9491           
=======================================
  Hits         7216     7216           
  Misses       2275     2275           
Flag Coverage Δ
unittests 76.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


await publish_message_to_ui_and_backend(
stream_output = self._model_client.create_stream(
messages=[self._system_message] + self._chat_history, max_consecutive_empty_chunk_tolerance=3
Copy link
Collaborator

Choose a reason for hiding this comment

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

The max_consecutive_empty_chunk_tolerance will need to be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, as we are installing dependencies for the sample from PyPi, we have to options on when to remove it:

  1. Remove it now, keep this PR open until we release another autogenerated version which contains the new logic
  2. Merge this PR, be ok with deprecation warning after a new release, and remove it when we will remove other packages.

@ekzhu please advice

@MohMaz MohMaz force-pushed the fix-streaming-in-distributed-group-chat-example branch from 7ea6b02 to ef4129c Compare February 4, 2025 07:06
@MohMaz MohMaz force-pushed the fix-streaming-in-distributed-group-chat-example branch from ef4129c to 2cfabaa Compare February 4, 2025 07:17
@MohMaz MohMaz requested a review from ekzhu February 4, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants