Skip to content

A little discord bot to connect your OpenAI compliant LLM API to a Discord server

License

Notifications You must be signed in to change notification settings

DFXLuna/discogpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discogpt

A little discord bot to connect your OpenAI compliant LLM API to a Discord server.

GitHub Downloads (all assets, all releases) GitHub License Codacy Badge

Requirements

Configuration

Discogpt uses a config.yaml file to provide application configuration. See the example here. Table of configurations is here

The easiest way to use Discogpt is as a container. Write a config.yaml and mount it into a container

Compose

version: "3"

services:
  discogpt:
    image: dfxluna/discogpt:latest
    volumes:
      - ./config.yaml:/discogpt/config.yaml
    restart: "unless-stopped"

Command line

docker run -d -v ./config.yaml:/discogpt/config.yaml dfxluna/discogpt:latest

ChromaDB memory

See docs/chroma.md

Config.yaml fields

See example-config.yaml.

Field Comment Example
Open AI Configuration
OAIHost The base url of your OpenAI API host. https://api.cloudflare.com/client/v4/accounts/{your_account_id}/ai
OAIToken If applicable, a bearer token to be provided with requests. Leave empty if not used. Service dependant.
OAISystemPrompt A prompt to include from user "System" as a message before the user's prompt. [You are ChadBot. The life of the party. ]
OAIModel Used to specify which model to use if multiple are available. Service dependant. If empty, either the service will choose (text-generation-webui) or can error. @hf/mistral/mistral-7b-instruct-v0.2
Discord Configuration
BotToken Your discord bot token
AllowedChannels A comma delimited list of Discord Channel IDs for the bot to operate in. 1137824512383429025,976152812312351829
App configuration
Trigger The case insensitive phrase that will trigger your bot. A space is automatically inserted after your trigger phrase. Hey ChadBot,
ChromaDB Configuration See docs/chroma.md
ChromaURL The protocol & URL of your Chroma DB server http://localhost:8000
ChromaTEIURL The protocol and URL of your Hugging Face TEI server http://localhost:8080
ChromaCollectionName The name of the collection in Chroma to store your message data in. Naming restrictions chadbot-test
Debug configuration
Mode Select what messager to use, current values are "Discord" (for connecting to discord) or "IO" (for local testing on stdio). Defaults to Discord Discord
Debug Enables debugging mode, which enable more logging. Defaults to false true
IOUser The username to use in IO mode Chad

Development Reqs

  • Go 1.22+
  • golangci-lint

Contributions

Feel free to file PRs, issues and requests.

Support

Feel free to file an issue if something is broken or missing a feature. A small donation is a large motivator for feature requests

ko-fi

About

A little discord bot to connect your OpenAI compliant LLM API to a Discord server

Resources

License

Stars

Watchers

Forks

Packages