- Notifications
You must be signed in to change notification settings - Fork229
⚡️ Build Your Own chatgpt Bot|🧀 Discord/Slack/Kook/Telegram |⛓ ToolCall|🔖 Plugin Support | 🌻 out-of-box | gpt-4o
License
LlmKira/Openaibot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
🍩 Deploy Docs &🧀 Dev Docs &🤝 Contribute
Don't hesitate to Star ⭐️, Issue 📝, and PR 🛠️
Python>=3.9
This project is not abandoned, just no new features are planned.If you encounter a problem, please raise an Issue
This project uses the ToolCall feature.
It integrates a message queuing and snapshot system, offering plugin mechanisms and authentication prior to pluginexecution.
The bot adheres to theOpenai Format Schema. Please adapt usinggatewayorone-api independently.
Demo | Vision With Voice | Code Interpreter |
---|---|---|
![]() | ![]() | ![]() |
The program has iterated to its fourth generation.
- Removal of legacy code
- Deletion of metric system
- Deletion of model selection system, unified to OpenAI Schema
- Implementation of a more robust plugin system
- Project structure simplification
- Elimination of the Provider system
- Hook support
- Access to TTS
- Add standalone support for gpt-4-turbo and vision
- Add LLM reference support to the plugin environment. (extract && search in text)
- 🍪 A comprehensive plugin development ecosystem, adopting a classic design, and seamless integration with pluginsthrough
pip
installation - 📝 Message system with no time or sender constraints, offering fully decoupled logics
- 📬 Offers Login via a URL mechanism, providing a flexible and expandable authentication development solution
- 🍰 Empowers users to authorize plugin execution. Users can configure plugin environment variables at their discretion
- 📦 Support for plugins to access files
- 🍟 Multi-platform support – extend new platforms by inheriting the base class
- 🍔 Plugins can determine their appearance in new sessions dynamically, preventing performance degradation despite largeamounts of plugins
Login via url
: Use/login <a token>$<something like https://provider.com/login>
to Login. The program posts the token to the interface toretrieve configurationinformation,how to develop this.Login
: Use/login https://<api endpoint>/v1$<api key>$<the model>$<tool model such as gpt-3.5-turbo>
to login
Sticker Converter | Timer Function(built-in) |
---|---|
![]() | ![]() |
Platform | Support | File System | Remarks |
---|---|---|---|
Telegram | ✅ | ✅ | |
Discord | ✅ | ✅ | |
Kook | ✅ | ✅ | Does not supporttriggering by reply |
Slack | ✅ | ✅ | Does not supporttriggering by reply |
Line | ❌ | ||
❌ | |||
❌ | |||
❌ | |||
Matrix | ❌ | ||
IRC | ❌ | ||
... | Create Issue/PR |
Refer to the🧀 Deployment Document for more information.
If you are using a brand-new server, you can use the following shell to automatically install this project.
curl -sSL https://raw.githubusercontent.com/LLMKira/Openaibot/main/deploy.sh| bash
# Install Voice dependenciesapt install ffmpeg# Install RabbitMQdocker pull rabbitmq:3.10-managementdocker run -d -p 5672:5672 -p 15672:15672 \ -e RABBITMQ_DEFAULT_USER=admin \ -e RABBITMQ_DEFAULT_PASS=8a8a8a \ --hostname myRabbit \ --name rabbitmq \ rabbitmq:3.10-managementdocker ps -l# Install Projectgit clone https://github.com/LlmKira/Openaibot/cd Openaibotpip install pdmpdm install -G botcp .env.exp .env&& nano .env# Testpdm run python3 start_sender.pypdm run python3 start_receiver.py# Hostapt install npmnpm install pm2 -gpm2 start pm2.json
Be sure to change the default password for the command, or disable open ports to prevent the database from beingscanned and attacked.
Build Hub:sudoskys/llmbot
Note that if you run this project using Docker, you will start Redis, MongoDB, and RabbitMQ. But if you're runninglocally, just RabbitMQ
git clone https://github.com/LlmKira/Openaibot.gitcd Openaibotcp .env.exp .env&&nano .envdocker-compose -f docker-compose.yml up -d
The Docker configuration filedocker-compose.yml
contains all databases. In fact, Redis and MongoDB are not required.You can remove these databases yourself and use the local file system.
Update image usingdocker-compose pull
.
Usedocker exec -it llmbot /bin/bash
to view Shell in Docker, enterexit
to exit.
clear - Deletes chat recordslogin - Login to the bothelp - Displays documentationchat - Conversationtask - Use afunctionto converseask - Disable function-based conversationstool - Lists all functionsauth - Authorize a functionenv - Environment variables of the functionlearn - Learn your instructions, /learn reset to clear
Refer to the example plugins in theplugins
directory andthe🧀 Plugin Development Document for plugin development documentation.
Hooks control the EventMessage in sender and receiver. For example, we havevoice_hook
in built-in hooks.
you can enable it by settingVOICE_REPLY_ME=true
in.env
.
/env VOICE_REPLY_ME=yes# must/env REECHO_VOICE_KEY=<keyin dev.reecho.ai># not must
use/env VOICE_REPLY_ME=NONE
to disable this env.
check the source code inllmkira/extra/voice_hook.py
, learn to write your own hooks.
This project, named OpenAiBot, signifying "Open Artificial Intelligence Robot", is not officially affiliated withOpenAI.
About
⚡️ Build Your Own chatgpt Bot|🧀 Discord/Slack/Kook/Telegram |⛓ ToolCall|🔖 Plugin Support | 🌻 out-of-box | gpt-4o