This is a Telegram chatbot that provides conversational personas for psychological counseling.
The bot allows users to:
- Choose between talking to a psychologist, psychotherapist, or hypnotherapist persona
- Purchase additional tokens to extend conversations when tokens run out
- Have natural conversations with the personas powered by GigaChat
The code manages user sessions and personas to provide a seamless experience.
To run this bot, you will need:
- Telegram bot token from @BotFather
- GigaChat credentials and model
- Provider token for payments
- Python dependencies: telebot, langchain, gigachat
Configure the tokens and credentials in the code.
Users can:
- Start the bot with /start
- Select a persona from the menu
- Have a conversation with the persona
- Purchase more tokens if they run out
The bot handles matching users to personas, tracking tokens, generating responses with GigaChat, and maintaining conversation context.
You can easily customize the bot by:
- Adding more personas
- Changing the persona initialization messages
- Modifying token usage limits
- Integrating different chatbot models like Claude or Anthropic
There are helpful utility functions for session management and sending bot messages.
Let me know if you have any other questions! Telegram: @jerhut
Treat me to coffee https://boosty.to/milkywave