Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/llmkira/openaibot
β‘οΈ Build Your Own chatgpt Bot|π§ Discord/Slack/Kook/Telegram |β ToolCall|π Plugin Support | π» out-of-box | gpt-4o
https://github.com/llmkira/openaibot
assistant chat-gpt discordbot gpt-4 gpt-4-vision-preview gpt-4o gpt-4o-mini kook-bot openai slack-bot
Last synced: 25 days ago
JSON representation
β‘οΈ Build Your Own chatgpt Bot|π§ Discord/Slack/Kook/Telegram |β ToolCall|π Plugin Support | π» out-of-box | gpt-4o
- Host: GitHub
- URL: https://github.com/llmkira/openaibot
- Owner: LlmKira
- License: apache-2.0
- Created: 2022-12-05T11:17:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T10:00:27.000Z (4 months ago)
- Last Synced: 2024-07-24T21:56:06.703Z (4 months ago)
- Topics: assistant, chat-gpt, discordbot, gpt-4, gpt-4-vision-preview, gpt-4o, gpt-4o-mini, kook-bot, openai, slack-bot
- Language: Python
- Homepage: https://llmkira.github.io/Docs
- Size: 17.9 MB
- Stars: 1,929
- Watchers: 21
- Forks: 230
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
- awesome-ChatGPT-repositories - Openaibot - β‘οΈ Build Your Own AssistantBot|π§ Discord/Slack/Kook/Telegram |π ε€ε» ChatGpt ζΆζ |β ToolCall/FunctionCall|π Plugin Support | π» sh & docker-compose (Browser-extensions)
README
![cover](https://raw.githubusercontent.com/LlmKira/.github/main/llmbot/project_cover.png)
------------------
π© Deploy Docs
&
π§ Dev Docs
&
π€ Contribute> Don't hesitate to Star βοΈ, Issue π, and PR π οΈ
> Python>=3.9
This project uses the ToolCall feature.
It integrates a message queuing and snapshot system, offering plugin mechanisms and authentication prior to plugin
execution.The bot adheres to the **Openai Format Schema**. Please adapt using [gateway](https://github.com/Portkey-AI/gateway)
or [one-api](https://github.com/songquanpeng/one-api) independently.| Demo | Vision With Voice | Code Interpreter |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| ![sticker](https://github.com/LlmKira/Openaibot/raw/main/docs/chain_chat.gif) | ![vision](https://github.com/LlmKira/Openaibot/raw/main/docs/vision.gif) | ![code](https://github.com/LlmKira/Openaibot/raw/main/docs/code_interpreter_func.gif) |## π¨ Roadmap
> The program has iterated to its fourth generation.
- [x] Removal of legacy code
- [x] Deletion of metric system
- [x] Deletion of model selection system, unified to OpenAI Schema
- [x] Implementation of a more robust plugin system
- [x] Project structure simplification
- [x] Elimination of the Provider system
- [x] Hook support
- [x] Access to TTS
- [x] Add standalone support for gpt-4-turbo and vision
- [ ] Add LLM reference support to the plugin environment. (extract && search in text)## π¦ Features
- πͺ A comprehensive plugin development ecosystem, adopting a classic design, and seamless integration with plugins
through `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 large
amounts of plugins### π Login Modes
### π§ Plugin Can Do More
| Sticker Converter | Timer Function(built-in) |
|-------------------------------------|---------------------------------|
| ![sticker](./docs/sticker_func.gif) | ![timer](./docs/timer_func.gif) |### π¬ Platform Support
| Platform | Support | File System | Remarks |
|----------|---------|-------------|----------------------------------------|
| Telegram | β | β | |
| Discord | β | β | |
| Kook | β | β | Does not support `triggering by reply` |
| Slack | β | β | Does not support `triggering by reply` |
| Line | β | | |
| QQ | β | | |
| Wechat | β | | |
| Twitter | β | | |
| Matrix | β | | |
| IRC | β | | |
| ... | | | Create Issue/PR |## π¦ Quick Start
Refer to the [π§ Deployment Document](https://llmkira.github.io/Docs/) for more information.
### π¦ One-click Deployment
If you are using a brand-new server, you can use the following shell to automatically install this project.
```shell
curl -sSL https://raw.githubusercontent.com/LLMKira/Openaibot/main/deploy.sh | bash
```### π¦ Manual Installation
```shell
# Install Voice dependencies
apt install ffmpeg
# Install RabbitMQ
docker pull rabbitmq:3.10-management
docker 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-management
docker ps -l
# Install Project
git clone https://github.com/LlmKira/Openaibot/
cd Openaibot
pip install pdm
pdm install -G bot
cp .env.exp .env && nano .env
# Test
pdm run python3 start_sender.py
pdm run python3 start_receiver.py
# Host
apt install npm
npm install pm2 -g
pm2 start pm2.json
```> **Be sure to change the default password for the command, or disable open ports to prevent the database from being
scanned and attacked.**### π₯£ Docker
Build Hub: [sudoskys/llmbot](https://hub.docker.com/repository/docker/sudoskys/llmbot/general)
> Note that if you run this project using Docker, you will start Redis, MongoDB, and RabbitMQ. But if you're running
> locally, just RabbitMQ#### Manual Docker-compose Installation
```shell
git clone https://github.com/LlmKira/Openaibot.git
cd Openaibot
cp .env.exp .env&&nano .env
docker-compose -f docker-compose.yml up -d
```The Docker configuration file `docker-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 using `docker-compose pull`.
Use `docker exec -it llmbot /bin/bash` to view Shell in Docker, enter `exit` to exit.
## πͺ Slash Commands
```shell
clear - Deletes chat records
login - Login to the bot
help - Displays documentation
chat - Conversation
task - Use a function to converse
ask - Disable function-based conversations
tool - Lists all functions
auth - Authorize a function
env - Environment variables of the function
learn - Learn your instructions, /learn reset to clear
```## π» How to Develop Plugins?
Refer to the example plugins in the `plugins` directory and
the [π§ Plugin Development Document](https://llmkira.github.io/Docs/dev/basic) for plugin development documentation.### Hooks
Hooks control the EventMessage in sender and receiver. For example, we have `voice_hook` in built-in hooks.
you can enable it by setting `VOICE_REPLY_ME=true` in `.env`.
```shell
/env VOICE_REPLY_ME=yes
# must/env REECHO_VOICE_KEY=
# not must
```use `/env VOICE_REPLY_ME=NONE` to disable this env.
check the source code in `llmkira/extra/voice_hook.py`, learn to write your own hooks.
## π§ Sponsor
[![sponsor](./.github/sponsor_ohmygpt.png)](https://www.ohmygpt.com)
## π Notice
> This project, named OpenAiBot, signifying "Open Artificial Intelligence Robot", is not officially affiliated with
> OpenAI.[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsudoskys%2FOpenaibot.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsudoskys%2FOpenaibot?ref=badge_small)