Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
arslanashraf7 committed Nov 27, 2024
1 parent 9db8659 commit e55dbbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/ol_openedx_chat/settings/cms_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def plugin_settings(settings):
Populate CMS settings
"""
settings.OL_CHAT_LLM_MODELS = []
settings.OL_CHAT_API_KEY = None


DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
3 changes: 1 addition & 2 deletions src/ol_openedx_chat/static/html/studio_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<label class="sub-label">Learners will see these prompts when using the chatbot feature</label>
<!-- Dropdown -->
<label for="llm-model-dropdown">Choose the Large Language Model (LLM) to use for this question</label>
<select class="llm-model-dropdown" id="llm-model-dropdown" name="llm-model-dropdown" value="{{ llm_model }}" required>
<select class="llm-dropdown" id="llm-model-dropdown" name="llm-model-dropdown" value="{{ llm_model }}" required>
<option>-- Select an LLM Model --</option>
{% for llm_model in llm_models_list %}
<option {% if selected_llm_model == llm_model %} selected {% endif %}>{{ llm_model }}</option>
{% endfor %}

</select>
<label class="sub-label">Set this so that AI instructions can be more formal, instructive, conversational, technical based on your choice</label>

Expand Down
6 changes: 2 additions & 4 deletions src/ol_openedx_chat/static/js/studio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

function OpenLearningChatView(runtime, element) {
console.log("ELEMENTTT", element)
// Sometimes the element is a jQuery object instead of a DOM object which leads to the broken chat form reference
if (element instanceof jQuery){
element = element[0]
}
Expand All @@ -26,12 +26,10 @@
data: JSON.stringify(dataToPost),
contentType: 'application/json; charset=utf-8',
success: function (response) {
// Handle successful response
alert("Saved successfully!");
},
error: function (xhr, status, error) {
// Handle error response
alert("Some Error!!!");
alert("There was an error saving the details. Please try again");
}
});

Expand Down

0 comments on commit e55dbbd

Please sign in to comment.