Skip to main content

A chain message bot based on OpenAI

Project description

cover


docker docker workflow
telegram discord
license docker build

🍩 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 model adheres to the Openai Schema, other models are not supported. Please adapt using gateways independently.

Demo
sticker

🍔 Roadmap

  • 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

📦 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

  • Login via url: Use /login token#https://provider.com to Login. The program posts the token to the interface to retrieve configuration information
  • Login: Use /login https://api.com/v1#key#model to login

🧀 Plugin Previews

Sticker Converter Timer Function Translate Function
sticker timer translate

🎬 Platform Support

Platform Support File System Remarks
Telegram
Discord
Kook Does not support triggering by reply
Slack Does not support triggering by reply
QQ
Wechat
Twitter
Matrix
IRC
... Create Issue/PR

📦 Quick Start

Refer to the 🧀 Deployment Document for more information.

# 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
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
pdm start pm2.json

🥣 Docker

Build Hub: sudoskys/llmbot

Automatic Docker/Docker-compose Installation

If you are using a brand new server, you can use the following shell to automatically install this project.

This script automatically installs the required services and maps ports using Docker methods. If you have deployed redis, rabbitmq, mongodb, please modify the docker-compose.yml file accordingly.

curl -sSL https://raw.githubusercontent.com/LLMKira/Openaibot/main/deploy.sh | bash

Manual Docker-compose Installation

git clone https://github.com/LlmKira/Openaibot.git
cd Openaibot
cp .env.exp .env&&nano .env
docker-compose -f docker-compose.yml up -d

Update image using docker-compose pull.

Use docker exec -it llmbot /bin/bash to view Shell in Docker, enter exit to exit.

🍪 Slash Commands

clear - Deletes chat records
help - Displays documentation
chat - Conversation
task - Use a function to converse
ask - Disable function-based conversations
tool - Lists all functions
login - Login
auth - Authorize a function
env - Environment variables of the function

💻 How to Develop Plugins?

Refer to the example plugins in the plugins directory and the 🧀 Plugin Development Document for plugin development documentation.

🧀 Sponsor

sponsor

📜 Notice

This project, named OpenAiBot, signifying "Open Artificial Intelligence Robot", is not officially affiliated with OpenAI.

FOSSA Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmkira-1.0.0.tar.gz (50.7 kB view details)

Uploaded Source

Built Distribution

llmkira-1.0.0-py3-none-any.whl (66.1 kB view details)

Uploaded Python 3

File details

Details for the file llmkira-1.0.0.tar.gz.

File metadata

  • Download URL: llmkira-1.0.0.tar.gz
  • Upload date:
  • Size: 50.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.14.0 CPython/3.10.12 Linux/6.5.0-1017-azure

File hashes

Hashes for llmkira-1.0.0.tar.gz
Algorithm Hash digest
SHA256 68d26ebe9ecf23e4430c20d55240b609c3b8fdda9bd6233c81cb214bafe31a32
MD5 6d023405bd3782138a7cc39e304d639a
BLAKE2b-256 88088a8ae966f2fd1ae6ff1191db42b35524064d30cf0b0a3fbad25e6e3a5e9e

See more details on using hashes here.

File details

Details for the file llmkira-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: llmkira-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 66.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.14.0 CPython/3.10.12 Linux/6.5.0-1017-azure

File hashes

Hashes for llmkira-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad71f1319f1c8e687d471bad15a633e16528a224bbac20bd0979ae05c2bc466f
MD5 d65eee2fbf9b4a603cbff02c603dacea
BLAKE2b-256 2e220daa45001fea89e757010b24fa2c296309504c1c78463ac02610a346260a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page