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: Token order during streaming #528

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

charles-marion
Copy link
Collaborator

@charles-marion charles-marion commented Aug 2, 2024

Issue #, if available:
#501

Description of changes:
Fixes two issues:

  • Only shows a token if the previous ones are available (so it only adds the words at the end)
  • Fix token missed. This happens when receiving 2 tokens in parallel. The fix is to move the reference of lastMessage.tokens out of updateMessageHistoryRef (so it uses the same array)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Fix.streaming.mov

@charles-marion charles-marion marked this pull request as ready for review August 2, 2024 18:28
@bigadsoleiman
Copy link
Collaborator

LGTM.

Thanks for this long awaited fix

@bigadsoleiman bigadsoleiman merged commit 6029fc6 into aws-samples:main Aug 2, 2024
1 check passed
@charles-marion charles-marion deleted the bug-streaming branch August 22, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants