- Bot for Telegram
- Bot for VK Group
- Telegram bot for logging
- Support quering Dealogflow API
- Script for training DialogFlow agent AI
-
Create Google Cloud project.
-
Create Dialogflow ES agent with previously created GCP id.
-
Create test Intent.
-
Manually train test intent
-
-
Add service account. Generate json key GOOGLE_APPLICATION_CREDENTIALS.
-
Enable Dialogflow API for project.
In case of code 403. IAM->PRINCIPALS->service account->add role->'Dialogflow API Admin'
- VK_TOKEN= <API token VK group>
- TG_TOKEN=<main telegram bot token>
- TG_LOGS_TOKEN=<telegram token for logs>.
- TG_CHAT_ID=<bot's admin id>
- DIALOGFLOW_PROJECT_ID=.
- GOOGLE_APPLICATION_CREDENTIALS=.
- Place training data into 'train_dialogflow\questions.json'. Format:
{
<intent_name>: {
'questions': [<question>, ...],
'answer': <answer>
}, ...
}
- Run script with -p or -path params.
python train_dialogflow.py -p questions.json
- Create group
- Add API key with sending messages permission.
- Enable messages in group.
- git clone
- Create virtual environment
python -m venv .venv
- Activate venv
.venv\scripts\activate
- Install requirements
pip install -r requirements.txt
- Start TG bot on local machine
python tg_bot.py
- Start new project
- Connect to GitHub
- Add env vars in project's settings
- Add necessary env vars for GCP and add a buildpack
- Deploy your app
- Enjoy