Data is taken from https://www.kaggle.com/datasets/ymaricar/cmu-book-summary-dataset/ and then limited with just a set of books.
The code shows how to give the agent role of Literary Analyst as well as limit OpenAI Langchain with an existing data and control the LLM replies.
python3 -m venv .venv
- Linux & WSL & MacOS
source .venv/bin/activate
- Windows
.venv\Scripts\activate
poetry install
python -m uvicorn backend.main:app --reload
- In order to run linting and tests on your local environment
tox -e test_lint_local
- If you are a Windows user want to test the application in Linux, kindyl run
tox -e test_docker_linux
- If you want to test everything at once, you can simply run
tox
- Kindly change OPENAI_API_KEY in Dockerfile with yours.
docker build -t myfastapiapp -f container/Dockerfile .
docker run -d --name myfastapiapp -p 80:80 -e OPENAI_API_KEY=your_api_key_here myfastapiapp
docker run --rm -it myfastapiapp /bin/bash



