-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Streaming choice feature #2070
base: main
Are you sure you want to change the base?
Streaming choice feature #2070
Conversation
private_gpt/ui/ui.py
Outdated
return { | ||
True: getattr(service, f'stream_{service_type}'), | ||
False: getattr(service, f'{service_type}') | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think reflection is necessary in this case. It complicates the understanding of the method a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider use lambda function or conventional functions and a switch statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies on merging main after the commit
Can you do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you!
Description
A checkbox in the UI to switch between streaming and non-streaming response output
Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist:
Notes:
Code under summarize is commented because I did not have success in employing that mode. While debugging I found that summarization would loop the output within the console and never result in output within the UI.