This is a Telegram bot that summarizes chats. It can give you the gist of the last N messages within the chat.
- Docker
- Python 3.12+
- Create a
.env
file based on.env.template
. - Fill in the API keys as required. Use your own keys, or ask the maintainers.
It's suggested to use the python build tool, Rye. Installation guides can be found on their site.
After Rye is installed, you run the following:
- Initialize the virtual environment and download the dependencies
rye sync
- Run the application via a run script
rye run dev
- Stop the application via a run script
rye run stop
You can run the application as a docker containers with the following.
docker-compose up -d --build
This will build the images for you then run them in a detached mode. If you do not need to build the images, you can use the following command.
docker-compose up -d
Use the following command to build the image
docker build . -t <tag-the-image>
- Create a run config using
main.py
- Set an LOCAL env variable (optional)
- Start the Redis database locally
rye run redis
- Run
main.py
This project contains tests. We use Pytest for the testing framework. Tests can be run 2 ways:
rye run tests
This executes the Rye test script.
pytest -n auto tests --spec
Runs Pytest in a parallel mode. Note: We create atom tests that facilitate this. Meaning, our practice is not writing tests that share state, or depending on the results from other tests.
The application requires a Redis cache to store messages.
docker-compose up -d
will spin up a cache for you. But if you
decide to use a different version, you'll have to get
the images from Redis' official Docker hub.