Skip to content

Chatbot with text-generation-webui and ChatGPT 3.5 backend with a sort-of long-term memory.

License

Notifications You must be signed in to change notification settings

ChrisDeadman/open-chatbot-js

Repository files navigation

🤖 Open Chat Bot

Chatbot with a 'sort-of' long-term memory 🧠 with Text generation web UI and ChatGPT backend.

🌟 Features

  • Support for multiple clients
    • web: 🌐 browser based chats (recommended)
    • discord: 🎮 a discord bot you can add to your server
    • terminal: 💻 terminal based chats
    • sttts: 🗣️ Speech-To-Text & Text-To-Speech
  • Rolling message history
  • Long-term memory using embeddings with Redi🔍 backend
  • Message correction that feeds corrections back into message history
    (e.g. corrects some command syntax issues)
  • Bots can call Tools (including web-browsing and code execution)
  • Multiple bots can be added to the conversation
    (reuses same model if model config is the same)

💥 Demo

web-client-1

📦 Dependencies

Required

Optional

🛠️ Configuration

Copy an example configuration from data/persistent/settings.example.*.json to data/persistent/settings.json.

🚀 Build and run docker image

docker build -t deads-inc/open-chatbot-js .
  • <mode> is one of the implemented clients, e.g. terminal
  • -d selects data/persistent as data directory
  • -b selects one of the backends under data/persistent/backends
  • -t selects one of the turn templates under data/persistent/turn_templates
  • -c selects one of the characters under data/persistent/characters
docker run -it --rm --net=host -v ./data/persistent/:/app/data/persistent/ deads-inc/open-chatbot-js <mode> -d data/persistent -b webui.example.json -t vicuna.json -c eva.example.json

🏗️ Build locally

cd ./open-chatbot-js
npm install --omit=dev
npx tsc --project tsconfig.prod.json

🐞 Run/Debug locally

see launch.json