Giter VIP home page Giter VIP logo

gpt3-discord-chatbot's Introduction

GPT3 Discord Chatbot

GPT3/OpenAI API chatbot for Discord, with easily customizable personality. Requires an OpenAI API key.

Sample

chatbot.py

This program handles interfacing with the OpenAI API. Based on a prexisting prompt (can be edited by changing the header argument of the Bot class), GPT3 will attempt to complete the conversation and respond to the user's input. Previous conversation lines are then added to the prompt, in order to give GPT3 context to generate further replies. This feature can be disabled, however it may result in less predicatable replies. This program can be run standalone in the terminal. Also implemented is the ability to save conversations as PKL files, which can then be loaded to continue the conversation.

discord.py

This program implements the Bot class from chatbot.py as a Discord bot. By mentioning the bot on a Discord server or in a DM, GPT3 will attempt to generate a reply to the message.

Setup

  1. Install the openai and discord Python libraries
  2. Enter your OpenAI API key in key.py
  3. (skip this step if you are not using the Discord feature) Enter your Discord bot token in config.py, along with the bot's Discord status and initial prompt (can be a simple description of a person and their personality)
  4. Run discord.py or chatbot.py, depending on which you want to use

gpt3-discord-chatbot's People

Contributors

bairminer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.