This is a work in progress, Latest version is merged to main branch but older versions are accessible in appropriately named branches.
- pip install pdfplumber
- pip install tf-keras
- pip install groq
- pip install adalflow
- pip install transformers
- pip install pydantic-settings
- pip install -U pytest
Run the application using the below command
python3.12 -m uvicorn app.main:app --reload
- Access specification at http://127.0.0.1:8000/api/v1/openapi.json
- Access the APIs using these endpoints
-
Health Check - http://127.0.0.1:8000/api/v1/health/
-
Document Upload - http://127.0.0.1:8000/api/v1/documents/upload
curl --location 'http://127.0.0.1:8000/api/v1/documents/upload' --form 'file=@"<add_file_path>"'
- Rag - http://127.0.0.1:8000/api/v1/rag/query
curl --location 'http://127.0.0.1:8000/api/v1/rag/query' --header 'Content-Type: application/json' --data '{"text":"Who won 2024 olympics"}'
Set PYTHONPATH before running tests
export PYTHONPATH=$PYTHONPATH:$(pwd)
$env:PYTHONPATH = "$env:PYTHONPATH;$(pwd)"
Then run tests
pytest
pytest --cov=app
pytest tests/unit/api/v1/endpoints/test_healthcheck.py
pytest -v