-
Notifications
You must be signed in to change notification settings - Fork 11
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
Chatbot debug mode #1401
Chatbot debug mode #1401
Conversation
e4e03cd
to
7172009
Compare
7172009
to
7ecb4d8
Compare
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.
How about having the debug switch set in backend? And so we can turn on for stage only
@jameswnl Updated the code to enable the debug UI via a setting ( |
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 👍
IDK if you'd like @jameswnl to review ad he requested the changes.
ansible_ai_connect/main/views.py
Outdated
@@ -136,6 +136,7 @@ def get_context_data(self, **kwargs): | |||
user = self.request.user | |||
if user and user.is_authenticated: | |||
context["user_name"] = user.username | |||
context["debug"] = "true" if settings.CHATBOT_DEBUG_UI == "true" else "false" |
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.
This could simply be context["debug"] = settings.CHATBOT_DEBUG_UI
.
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.
Thanks for your comment. This code was wrong because settings.CHATBOT_DEBUG_UI
is boolean and cannot have "true" as a value... I have fixed it in the newest commit.
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 👍
Quality Gate passedIssues Measures |
Jira Issue: https://issues.redhat.com/browse/AAP-35616
Description
Enable "debug" chatbot UI that allows end-user to pick up a model to be used. This time it only allows to use the default
granite-8b
model and thegranite3-8b
model, which was installed with AAP-35616,This is enabled only when the chatbot UI is loaded with
?debug=true
query parameter, e.g.https://stage.ai.ansible.redhat.com/chatbot?debug=true
Testing
Steps to test
Scenarios tested
Unit tests are included
Production deployment