Skip to content

The Claude3_TelegramBot is a Telegram bot that allows users to chat with the Anthropic AI assistant, Claude. Users can start new conversations, switch between different language models, and the bot will remember and respond to previous messages. The conversation history is saved to both text and JSON files for each user.

License

Notifications You must be signed in to change notification settings

masllsam/Claude3_TelegramBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

**Repository Name:** Claude3_TelegramBot

**Description:**
The Claude3_TelegramBot is a Telegram bot that allows users to chat with the Anthropic AI assistant, Claude. Users can start new conversations, switch between different language models, and the bot will remember and respond to previous messages. The conversation history is saved to both text and JSON files for each user, ensuring privacy and legal compliance.


# Claude3_TelegramBot

The Claude3_TelegramBot is a Telegram bot that allows users to chat with the Anthropic AI assistant, Claude. Users can start new conversations, switch between different language models, and the bot will remember and respond to previous messages. The conversation history is saved to both text and JSON files for each user, ensuring privacy and legal compliance.

## Features

- Start a new conversation with the `/start` or `/new` commands
- Switch between different language models using the `/opus`, `/sonnet`, and `/haiku` commands
- View available commands using the `/help` command
- Conversation history is saved to text and JSON files for each user
- Ensures privacy and legal compliance by storing conversation data separately for each user

## Installation

1. Clone the repository:
   ```
   git clone https://github.com/masllsam/Claude3_TelegramBot.git
   ```
2. Navigate to the project directory:
   ```
   cd claude-conversation-bot
   ```
3. Create a virtual environment and activate it:
   ```
   python -m venv venv
   source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
   ```
4. Install the required dependencies:
   ```
   pip install -r requirements.txt
   ```
5. Create a `.env` file in the project directory and add your Anthropic API key and Telegram bot API token:
   ```
   ANTHROPIC_API_KEY=your_anthropic_api_key
   TELEGRAM_BOT_TOKEN=your_telegram_bot_token
   ```
6. Run the bot:
   ```
   python claude_t_convo.py
   ```

## Usage

Once the bot is running, you can interact with it using the following commands:

- `/start` or `/new`: Start a new conversation
- `/opus`: Switch to the Claude 3 Opus model
- `/sonnet`: Switch to the Claude 3 Sonnet model
- `/haiku`: Switch to the Claude 3 Haiku model
- `/help`: List all available commands

The bot will remember your previous messages and respond accordingly. Your conversation history will be saved to text and JSON files in the project directory.

## Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

## License

This project is licensed under the [MIT License](LICENSE).

About

The Claude3_TelegramBot is a Telegram bot that allows users to chat with the Anthropic AI assistant, Claude. Users can start new conversations, switch between different language models, and the bot will remember and respond to previous messages. The conversation history is saved to both text and JSON files for each user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages