-
Notifications
You must be signed in to change notification settings - Fork 10
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
Option to enable chat streaming #1516
Option to enable chat streaming #1516
Conversation
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 2c about how new configuration options should be handled...
3cfc3c8
to
aadf74e
Compare
@TamiTakamiya I'll look again tomorrow. If it's urgent perhaps ask someone else to look. |
@manstis I have pushed the changes based on your comments. A new environment variable is no longer included. Please take a look. Thank you. Notes:
|
@manstis It's not urgent. Pls take time :-) |
ansible_ai_connect/main/views.py
Outdated
@@ -140,6 +140,11 @@ def get_context_data(self, **kwargs): | |||
context["user_name"] = user.username | |||
context["debug"] = "true" if settings.CHATBOT_DEBUG_UI else "false" | |||
|
|||
llm: ModelPipelineChatBot = apps.get_app_config("ai").get_model_pipeline( |
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.
Hint for optimisation (not that what you have written is slow/expensive to call).
You could have got the instance in a __init__
function...
... and used this in L#146 and L#126-L#130.
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.
@manstis I have update the code based on your comment. Pls re-review this when you have time. Thanks!
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.
@TamiTakamiya LGTM 👍 but I am confused as to whether stream
is a static configuration parameter or a dynamic runtime variable.. Please see my comments.
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.
Thank-you for the explanation @TamiTakamiya
LGTM 👍
|
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.
Jira Issue: https://issues.redhat.com/browse/AAP-39043
Description
Add an option to enable chat streaming to our AI Connect service Django application. The new option is
and its default value is set to
False
. UnlessCHATBOT_STREAM
is set toTrue
, the chat streaming support code willnot be enabled.
Testing
Steps to test
Scenarios tested
Unit tests are provided with this PR.
Production deployment