A simple mattermost bot that supports chatting with ChatGPT, Bing AI, Google Bard
Find a file
hibobmaster 7142045292
feat: refactor chat backend
feat: introduce pre-commit hooks
feat: send reply in thread
fix: !gpt !chat API endpoint and API key validation logic
2023-09-18 13:47:50 +08:00
.github/workflows feat: refactor chat backend 2023-09-18 13:47:50 +08:00
src feat: refactor chat backend 2023-09-18 13:47:50 +08:00
.dockerignore feat: refactor chat backend 2023-09-18 13:47:50 +08:00
.env.example feat: refactor chat backend 2023-09-18 13:47:50 +08:00
.full-env.example feat: refactor chat backend 2023-09-18 13:47:50 +08:00
.gitignore feat: refactor chat backend 2023-09-18 13:47:50 +08:00
.pre-commit-config.yaml feat: refactor chat backend 2023-09-18 13:47:50 +08:00
CHANGELOG.md feat: refactor chat backend 2023-09-18 13:47:50 +08:00
compose.yaml feat: refactor chat backend 2023-09-18 13:47:50 +08:00
config.json.example feat: refactor chat backend 2023-09-18 13:47:50 +08:00
Dockerfile refactor code structure and remove unused 2023-08-06 12:09:40 +08:00
full-config.json.example feat: refactor chat backend 2023-09-18 13:47:50 +08:00
LICENSE refactor code structure and remove unused 2023-08-06 12:09:40 +08:00
README.md feat: refactor chat backend 2023-09-18 13:47:50 +08:00
requirements.txt feat: refactor chat backend 2023-09-18 13:47:50 +08:00

Introduction

This is a simple Mattermost Bot that uses OpenAI's GPT API(or self-host models) to generate responses to user inputs. The bot responds to these commands: !gpt, !chat and !new and !help depending on the first word of the prompt.

Feature

  1. Support Openai ChatGPT
  2. ChatGPT web (pandora)

Installation and Setup

See https://github.com/hibobmaster/mattermost_bot/wiki

Edit config.json or .env with proper values

docker compose up -d

Commands

  • !help help message
  • !gpt + [prompt] generate a one time response from chatGPT
  • !chat + [prompt] chat using official chatGPT api with context conversation
  • !pic + [prompt] generate an image from Bing Image Creator

The following commands need pandora http api: https://github.com/pengzhile/pandora/blob/master/doc/wiki_en.md#http-restful-api

  • !talk + [prompt] chat using chatGPT web with context conversation
  • !goon ask chatGPT to complete the missing part from previous conversation
  • !new start a new converstaion

Demo

Remove support for Bing AI, Google Bard due to technical problems. demo1 demo2 demo3

Thanks

JetBrains Logo (Main) logo.