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

[Feature] Add streaming ability in chat page using default SDK #387

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

phanthaiduong22
Copy link

Purpose

  • Currently, on the Chat page, when we ask a question, the system gathers all information (e.g., answer, thought, supportingContent, etc.) and responds to the client through the API.
  • We are adding streaming capability. Whenever the LLM responds with an answer in a streaming format.

Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code
azd up

What to Check

Verify that the following are valid

  • ...

Other Information

@phanthaiduong22
Copy link
Author

hi @IEvangelist @LittleLittleCloud Can you take a look at this PR for adding the streaming feature?

I still have two issues where I’d like your suggestions as well:

  1. A minor UX issue: it displays an incomplete JSON. I’m considering changing the query format to the LLM to expect a different format instead of JSON (because JSON also have some issue with deserialization as well)
    image
  2. I checked the network tab, and the messages are streaming back as expected. However, the UI keeps showing I'm generating an answer... Please wait. until it receives the full response from the server. Only then does it start streaming the response to the frontend.
    image

I'm not sure if this behavior is expected. Could you suggest or comment on which part I should change? Thank you!

@LittleLittleCloud LittleLittleCloud self-requested a review December 16, 2024 18:31
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.

1 participant