A Flask application hosting endpoints for AI TA backend.
👉 See the main app for details: https://github.com/UIUC-Chatbot/ai-teaching-assistant-uiuc
This project is available under the CC BY-NC 4.0 License which restricts commercial use.
For commercial use of this project, you must obtain a separate commercial license. Please contact [email protected] and [email protected] to inquire about commercial licensing terms.
Failure to obtain a commercial license for commercial use is a violation of the terms of this project.
- Duplicate
.env.template
and rename it to.env
. E.g.cp .env.template .env
- Customize your env variables. Your vector database can be either Qdrant and Pinecone. The SQL database can be any of SQLite, Postgres, and Supabase. The object storage can be Minio or AWS S3.
- Run Docker Compose
docker compose up --build
- Navitage to
localhost:8000
(or whatever your$FLASK_PORT
is)
To customize HTTP port used as the main entrypoint, set the FLASK_PORT
variabel in your .env
. It defaults to 8000.
Works on version: Docker Compose version v2.27.1-desktop.1
Works on Apple Silicon M1 aarch64
, and x86
.
See docs on https://docs.uiuc.chat
If you're interested in contributing, check out our official developer quickstart.
For local dev:
- Rename
.env.template
to.env
and fill in the required variables - Install Python requirements
pip install -r requirements.txt
- Start the server for development (with live reloads)
cd ai_ta_backend
thenflask --app ai_ta_backend.main:app --debug run --port 8000
'text': doc.page_content,
'readable_filename': doc.metadata['readable_filename'],
'course_name ': doc.metadata['course_name'],
's3_path': doc.metadata['s3_path'],
'pagenumber': doc.metadata['pagenumber_or_timestamp'], # this is the recent breaking change!!
# OPTIONAL properties
'url': doc.metadata.get('url'), # wouldn't this error out?
'base_url': doc.metadata.get('base_url'),