Giter VIP home page Giter VIP logo

claudewrapper's Introduction

Claude Multi-User Bot

采用 SQL Lite 与 python-telegram-bot 设计的 Telegram Claude 问答机器人

Maintenance

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
deactivate
npm install pm2 -g
pm2 start bot.py --interpreter venv/bin/python3.11

Usage

The bot responds to commands and messages in both private chats and supergroups.

Commands:

  • /c <message>: Send a message to initiate a conversation with the bot.
  • /clear: Clear your conversation history and context.
  • /list (Super Admin Only): List all users and their conversation counts.
  • /search <user_id> (Super Admin Only): Search for a user and retrieve their information.
  • /delete <user_id> (Super Admin Only): Delete a user and their data.
  • /add <user_id> (Super Admin Only): Add a new user.

File Processing:

  • In a private chat, upload a text file (.txt or .md) to have the bot process and respond to the content.

Super Admins:

  • Super admins are users specified in the SUPER_ADMIN_IDS list in config.py. They have additional commands for user management.

Important Notes

  • The bot will automatically clear a user's conversation history after 50 interactions to avoid excessive data accumulation.

  • If the Claude-3 API encounters an error, the bot will attempt to retry up to three times before notifying the user of an empty response.

  • The bot will only process text files (.txt or .md) of size between 5 bytes and 30MB.

License

This project is licensed under the MIT License.

claudewrapper's People

Contributors

itchat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.