The goal of this repository is to implement an API that customers of the Jurisearch tool can use to query the backend database.
It is also the API that the official site uses.
This repository contains the following files and directories:
- main.py: Main Python script implementing the API.
- .gitignore: Gitignore file for this repository.
- requirements.txt: PIP requirements file to install required packages.
- README.md: The Readme file you are currently reading.
The Python enviroment used for this repository was purposefully kept as simple as possible, with minimal dependencies.
An environment containing the required packages with compatible versions can be created as follows:
conda create -n customers_api python==3.12.4
conda activate customers_api
pip install -r requirements.txtThis repository depends on EmbeddingAndRetrieval.
It is therefore needed to clone EmbeddingAndRetrieval, install its requirements in the same environment and add it to system's path:
git clone https://github.com/jurisearch/EmbeddingAndRetrieval
cd EmbeddingAndRetrieval
pip install -r requirements.txt
export PATH=$PATH:$(pwd)To get the API up and running, simply activate the correct conda environment and, from this repository's main directory (where this README is stored) run:
fastapi run app/main.py