Skip to content

Commit

Permalink
feat: use default prompt template (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
alangsto authored Oct 15, 2024
1 parent f4cf44a commit d89f5ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Change Log
Unreleased
**********

4.3.3 - 2024-10-15
******************
* Use `LEARNING_ASSISTANT_PROMPT_TEMPLATE` for prompt

4.3.2 - 2024-09-19
******************
* Add error handling for invalid unit usage keys
Expand Down
2 changes: 1 addition & 1 deletion learning_assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Plugin for a learning assistant backend, intended for use within edx-platform.
"""

__version__ = '4.3.2'
__version__ = '4.3.3'

default_app_config = 'learning_assistant.apps.LearningAssistantConfig' # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion learning_assistant/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def post(self, request, course_run_id):

course_id = get_course_id(course_run_id)

template_string = getattr(settings, 'LEARNING_ASSISTANT_EXPERIMENTAL_PROMPT_TEMPLATE', '')
template_string = getattr(settings, 'LEARNING_ASSISTANT_PROMPT_TEMPLATE', '')

prompt_template = render_prompt_template(
request, request.user.id, course_run_id, unit_id, course_id, template_string
Expand Down
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_invalid_messages(self, mock_role, mock_waffle, mock_render):
@patch('learning_assistant.views.get_user_role')
@patch('learning_assistant.views.CourseEnrollment.get_enrollment')
@patch('learning_assistant.views.CourseMode')
@override_settings(LEARNING_ASSISTANT_EXPERIMENTAL_PROMPT_TEMPLATE='This is the default template')
@override_settings(LEARNING_ASSISTANT_PROMPT_TEMPLATE='This is the default template')
def test_chat_response_default(
self, mock_mode, mock_enrollment, mock_role, mock_waffle, mock_chat_response, mock_render
):
Expand Down

0 comments on commit d89f5ad

Please sign in to comment.