This is the LLM-based assistant for the EzHr-Chatbot project. It makes use of RAG and LlamaIndex to provide a conversational interface for the users.
Read more documentation: https://tinhhoasolutions-ezhr.github.io/chatbot/
- Python >= 3.11.10 (specified at
.tool-versions
andpyproject.toml
) - uv >= 0.5.26. Installation guide
- Docker and Docker Compose V2. Installation guide
- NodeJS >= 22.12.0 (specified at
.tool-versions
) and yarn 1.22.22 (optional)
To easier install and manage all of them, recommend to use asdf or mise.
For developing and testing purposes, we can use the docker compose to run the API server.
-
Go to the root directory
-
Create the environment file from example
cp .env.example .env
Contact @lelouvincx to grant an OpenAI API key for you.
(Optional) If you want to use direnv, you can use the .envrc file
direnv allow
Then the environment variables from .env
will be loaded and unloaded when you enter and exit the directory.
If you don't want to use direnv, you can go ahead with the .env
file.
- Build the docker image:
make build
# Or this command
docker compose -f deployment/docker_compose/docker-compose.dev.yaml -p chatbot build
- Run the docker container
make up
# Or command
docker compose -f deployment/docker_compose/docker-compose.dev.yaml -p chatbot up -d
- Ping the API Server
curl http://localhost:5000/health | jq
- For more commands, you can use the Makefile
make help
- To stop the container
make down
- To remove the container
make clean
Every necessary commands are in the Makefile. You can use make help
to see all available commands.
- Install
pre-commit
hooks
Since you've installed uv
or nodejs
, can install pre-commit by one of these commands:
uvx [email protected] install
# Equivalent command in npm
npm install [email protected]
pre-commit install
This will initialize the pre-commit hooks for the project. From now, everytime making a new commit, the pre-commit hooks will be run to check the code quality.
Read more at backend/README.md
Read more at frontend/README.md
If you encounter the error with dockerfile_inline, can check again the docker compose version. Currently we are using the Docker Compose V2.