This is a microservice for the EduQuest application. The main purpose is to invoke an LLM to retrieve documents and generate questions.
-
Clone the repository:
git clone https://github.com/xeroxis-xs/eduquest-microservice-flask.git cd eduquest-microservice-flask
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
To use this microservice, you need to have the necessary environment variables set up and the Flask application running.
Create a .env
file in the root directory of the project and add the following environment variables:
AZURE_OPENAI_API_KEY=your_azure_openai_api_key
AZURE_OPENAI_API_VERSION=your_azure_openai_api_version
AZURE_OPENAI_ENDPOINT=yopur_azure_openai_endpoint
AZURE_OPENAI_DEPLOYMENT_NAME=yopur_azure_openai_deployment_name
AZURE_OPENAI_TEMPERATURE=your_azure_openai_temperature
AZURE_STORAGE_CONNECTION_STRING=your_azure_storage_account_connection_string
AZURE_STORAGE_CONTAINER_NAME=your_azure_storage_account_container_name
- Select the Run/Debug Configuration dropdown in the top right corner of the PyCharm window.
2. Select Flask from the dropdown menu. 3. Click on the green play button to run the application.
- Activate the virtual environment:
source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Run the Flask application:
flask run