Creating a VK Chatbot with AI via Senler
Creating a chatbot for your VKontakte community using the Senler service can be done in several steps. Below is a step-by-step guide to creating a bot that will interact with users through "clean" and "teacher" modes.
Step 1: Creating a Chatbotβ
- Log in to your personal account on the Senler website and select your community.
- Go to the "Chatbots" section and click the "New Bot" button.
- Enter the bot's name and save it. The system will automatically generate a bot key.
Step 2: Setting Up the First Blockβ
- Create the first block that will send a message to the user with the text: "Hello, choose a mode".
- Add two buttons:
- First button: name "clean", type: text.
- Second button: name "teacher", type: text.
- The color of the buttons can be chosen arbitrarily.
Step 3: Creating User Variablesβ
1. Create two action blocks and add the user variable mode.β
2. For the first action, set the value to clean, for the second β learn.β
3. Add the message "write a question", and check the "Wait for response" box.β
4. Create an Action where the response to the message is saved in the user variable question.β
Step 4: Condition Groupβ
- Create a "Condition Group" block with two conditions:
- First condition: mode = clean.
- Second condition: mode = learn.
Step 5: Integration with ChatGPTβ
- Create two ChatGPT integration blocks, one for each mode.
- Set up ChatGPT for clean mode:
- Insert the OpenAI API key.
- Select the Chat type and model.
- Set the instruction: "Reply to the user in their language".
Step 6: Setting Up ChatGPT for Learn Modeβ
- Repeat the settings as for clean mode, but change the instruction to: "Reply to the user in their language. You are well versed in JavaScript, TypeScript, React Native and similar languages".