Finance bot built on dff
. Uses telegram as an interface.
This bot listens for user questions and finds similar questions in its database by using the clips/mfaq
model.
It displays found questions as buttons. Upon pressing a button, the bot sends an answer to the question from the database.
An example of bot usage:
In order for the bot to work, set the bot token via .env. First step is creating your .env
file:
echo TG_BOT_TOKEN=******* >> .env
conda install -y -c conda-forge postgresql
initdb -D finance_db
pg_ctl -D finance_db -l logfile start
createuser --encrypted --pwprompt __username__
createdb --owner=__username__ inner_finance_db
echo POSTGRES_USERNAME=******* >> bot/.env
echo POSTGRES_PASSWORD=******* >> bot/.env
echo POSTGRES_DB=******* >> bot/.env
Get token from Tinkoff
. Instruction is here
echo TINKOFF_TOKEN=******* >> .env
<<<<<<< HEAD
=======
In order for the bot to work, set the bot token via .env. First step is creating your .env
file:
0fea0f1162dae6f5a211dd250d7e63f5effc93a7
pip install -r bot/requirements.txt
python bot/run.py
Build the bot:
docker-compose build
Testing the bot:
docker-compose run bot pytest test.py
Running the bot:
docker-compose run bot python run.py
Running in background
docker-compose up -d
In order for the bot to work, set the bot token, example is in .env. First step is setting environment variables:
export TG_BOT_TOKEN=*******
export TINKOFF_TOKEN==*******
Build the bot:
pip3 install -r requirements.txt
Testing the bot:
pytest test.py
Running the bot:
python run.py
Read CONTRIBUTING.md
Vladimir Dimitrov