Skip to main content

Plugin for a learning assistant backend, intended for use within edx-platform

Project description

learning-assistant

PyPI CI Codecov Documentation Supported Python versions License status-badge

Purpose

Plugin for a learning assistant backend, intended for use within edx-platform.

This library contains data models and logic for a platform wide learning assistant.

Dependencies

In addition to the edx-platform repository in which this library is installed, this plugin also leverages the frontend-lib-learning-assistant as a frontend interface for the learning assistant.

Getting Started

Developing

One Time Setup

# Clone the repository
git clone git@github.com:openedx/learning-assistant.git
cd learning-assistant

# Set up a virtualenv with the same name as the repo and activate it
# Here's how you might do that if you have virtualenvwrapper setup.
mkvirtualenv -p python3.8 learning-assistant

Every time you develop something in this repo

# Activate the virtualenv
# Here's how you might do that if you're using virtualenvwrapper.
workon learning-assistant

# Grab the latest code
git checkout main
git pull

# Install/update the dev requirements
make requirements

# Run the tests and quality checks (to verify the status before you make any changes)
make validate

# Make a new branch for your changes
git checkout -b <your_github_username>/<short_description>

# Using your favorite editor, edit the code to make your change.
vim ...

# Run your new tests
pytest ./path/to/new/tests

# Run all the tests and quality checks
make validate

# Commit all your changes
git commit ...
git push

# Open a PR and ask for review.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

Contributing

This repo is not currently accepting contributions.

The Open edX Code of Conduct

All community members are expected to follow the Open edX Code of Conduct.

Reporting Security Issues

Please do not report security issues in public. Please email security@edx.org.

Change Log

Unreleased

4.4.1 - 2024-10-31

  • Add management command to remove expired messages

4.4.0 - 2024-10-30

  • Add LearningAssistantMessage model

  • Add new GET endpoint to retrieve a user’s message history in a given course.

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

4.3.1 - 2024-09-10

  • Remove GPT model field as part of POST request to Xpert backend

4.3.0 - 2024-07-01

  • Adds optional parameter to use updated prompt and model for the chat response.

4.2.0 - 2024-02-28

  • Modify call to Xpert backend to prevent use of course index.

4.1.0 - 2024-02-26

  • Use course cache to inject course title and course skill names into prompt template.

4.0.0 - 2024-02-21

  • Remove use of course waffle flag. Use the django setting LEARNING_ASSISTANT_AVAILABLE to enable the learning assistant feature.

3.6.0 - 2024-02-13

  • Enable backend access by course waffle flag or django setting.

3.4.0 - 2024-01-30

  • Add new GET endpoint to retrieve whether Learning Assistant is enabled in a given course.

3.3.0 - 2024-01-30

  • Fix release version

3.2.0 - 2024-01-30

  • Remove audit access to chat view.

3.0.1 - 2024-01-29

  • Modify gating of learning assistant based on waffle flag and enabled value.

3.0.0 - 2024-01-23

  • Remove and drop the course prompt model.

2.0.3 - 2024-01-22

  • Remove references to the course prompt model.

2.0.1 - 2024-01-08

  • Gate content integration with waffle flag

2.0.0 - 2024-01-03

  • Add content cache

  • Integrate system prompt setting

1.5.0 - 2023-10-18

  • Add management command to generate course prompts

1.4.0 - 2023-09-11

  • Send reduced message list if needed to avoid going over token limit

1.3.3 - 2023-09-07

  • Allow any enrolled learner to access API.

1.3.2 - 2023-08-25

  • Remove deserialization of prompt field, as it is represented in the python native format

1.3.1 - 2023-08-24

  • Remove prompt field

1.3.0 - 2023-08-24

  • Remove references to prompt field

  • Create json_prompt field to allow for more flexible prompts

1.2.1 - 2023-08-24

  • make prompt field nullable

1.2.0 - 2023-08-22

  • add endpoint authentication

  • fix request structure required for endpoint integration

1.1.0 - 2023-08-09

  • fix for course id to course key conversion

1.0.0 - 2023-08-08

  • Add endpoint to retrieve chat response

  • Created model to associate course ideas with a specific prompt text

Unreleased

0.1.0 – 2023-07-26

Added

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learning_assistant-4.4.3.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

learning_assistant-4.4.3-py2.py3-none-any.whl (37.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file learning_assistant-4.4.3.tar.gz.

File metadata

  • Download URL: learning_assistant-4.4.3.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for learning_assistant-4.4.3.tar.gz
Algorithm Hash digest
SHA256 d95f1340e1bdda063f103bd1c8272bdee87bde3f7013d2b2354c50b14d33653d
MD5 b263112df15469a632d656ca5f71589f
BLAKE2b-256 9440f28e4daa77ae08d6d3f64ac3962e02fee709eb21a48627f71f1f93746a12

See more details on using hashes here.

File details

Details for the file learning_assistant-4.4.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for learning_assistant-4.4.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 67608a031d9721b08b503fc13f425872891618edb142513b9048cc418047f9f4
MD5 ab5d760cad12fb40af56925ced4b2f3e
BLAKE2b-256 a99cff04df93e1a4da6177b3b25b98225af97a6f3ab89ce68e3d39f10d706104

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page