Giter Club home page Giter Club logo

doug_ai's Introduction

doug_ai

Doug is a GPT3-powered Slack chatbot, leveraging OpenAI's API. He is prompted to respond to any query as if he is the creator of Moodle, and he is given a short background about Moodle in said prompt. This makes his responses more likely to be within the relevant context.

image

Using

Doug will respond to direct messages on an individual basis, interpreting each message as a separate question. If Doug has joined a channel, he can be tagged and will respond to the message in which he is tagged -- again, on an individual basis, without considering the surrounding message context. If the string "what do you think" is contained in the message in which Doug is tagged, he will consider the last 10 messages in the channel before responding.

By default, Doug will use the davinci-instruct-beta engine. Users can manually choose to process the query with the davinci engine instead by "piping" the query into it: ie, "What is your favorite color, Doug? | davinci"

I am planning to generalize this functionality to allow any GPT3 engine to be selected by the user.

Installing

  • set up a Slack chat bot with the following scopes:
    • App-Level token: connections:write
    • Bot token: app_mentions:read
    • Bot token: channels:history
    • Bot token: channels:read
    • Bot token: chat:write
    • Bot token: groups:history
    • Bot token: im:history
    • Bot token: im:write
    • Bot token: mpim:write
  • install bot to workspace and copy bot's "member ID"
  • clone project
  • python3 install -r requirements.txt
  • create .env file with following values:
    • APP_TOKEN=slack app token
    • BOT_TOKEN=slack bot token
    • BOT_ID=member ID copied above
    • OPENAI_KEY=openAI API key
  • Run the script!

doug_ai's People

Contributors

limekiller avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  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.