Git Product home page Git Product logo

apter-tech / wumpus-gpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from capibawa/wumpus-gpt

0.0 0.0 0.0 603 KB

ChatGPT-like Discord chatbot written in TypeScript and powered by OpenAI's `gpt-4` and `gpt-3.5-turbo` language models.

Home Page: https://discord.com/api/oauth2/authorize?client_id=1054835849893793872&permissions=397284550656&scope=bot

License: MIT License

Shell 0.21% JavaScript 0.23% TypeScript 99.20% Dockerfile 0.36%

wumpus-gpt's Introduction

WumpusGPT

Discord

WumpusGPT is a Discord chatbot written in TypeScript and powered by OpenAI's gpt-4 and gpt-3.5-turbo language models.

Although WumpusGPT is not quite the same as ChatGPT, they both utilize the same language model so you will yield very similar results.

Built with OpenAI Node.js Library and discord.js. Inspired by OpenAI's GPT Discord Bot.

You can invite the bot to your server by clicking here.

Roadmap

Warning This is a work in progress. Feel free to contribute!

  • Direct Messaging
  • Mention Replies
  • Message Moderation
  • Rate Limiting
  • Thread Pruning

Features

  • Configurable bot instruction/behaviour
  • Remembers previous messages in threads
  • Ability to regenerate responses (only in threads)
  • Image generation using DALL·E via /image
  • Rate limiting per user to prevent abuse
  • Automatic thread pruning (enabled by default)

Get Started

  1. Copy .env.example to .env and fill in the values as detailed below

  2. Create a MySQL database (I recommend PlanetScale if you don't want to host locally) and fill in DATABASE_URL

  3. Create a Discord application at https://discord.com/developers/applications

  4. Go to the Bot tab and click "Add Bot"

    • Click "Reset Token" and fill in DISCORD_TOKEN
    • Disable "Public Bot" unless you want your bot to be visible to everyone
    • Enable "Server Members Intent" and "Message Content Intent" under "Privileged Gateway Intents"
  5. Go to the OAuth2 tab, copy your "Client ID", and fill in DISCORD_CLIENT_ID

  6. Go to https://beta.openai.com/account/api-keys, create an API key, and fill in OPENAI_API_KEY

  7. Feel free to set OPENAI_MODEL if you have access to gpt-4, otherwise gpt-3.5-turbo is the default

  8. Install dependencies and run the bot

    npm install
    npm start
    

    Or run the bot in a Docker image:

    docker-compose up -d
    docker-compose logs -t wumpus-gpt-discord-bot
    

    You should see an invite URL in the console. Copy and paste it into your browser to add the bot to your server.

  9. Start chatting with the bot via the /chat or /ask commands

License

Licensed under the MIT license.

wumpus-gpt's People

Contributors

capibawa avatar warnyul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.