Giter Club home page Giter Club logo

askgpt3's Introduction

Ask GPT3

A simple wrapper for OpenAI GPT-3 question/answer engine.

AMA GTP3

๐Ÿ’ซ Demo

Here is a free and publicly available instance that you can play with

https://amagpt3.com

Note: I put some limitations to avoid explode my budget. the question and the answer has a max of 100 characters


Support

If you enjoy amagpt3 and you want to support it, you can buy me a coffe

Buy Me A Coffee

๐Ÿ”Œ Installation

API

$ make setup-api

Website

$ make setup-website

Cli

$ make setup-cli

Slack Bot

$ make setup-slack

Configuration

You need to provide your own OPENAI API key (Required)

$ export OPENAI_API_KEY=<YOUR KEY HERE>

You can get one by signing up for free here ๐Ÿ‘‰ https://openai.com/api/

$ export OPENAI_MODEL=<MODEL>

By default, text-babbage-001 model is used.

More infos here ๐Ÿ‘‰ https://beta.openai.com/docs/api-reference/models/list


For Slack bot, you need to provide the following tokens:

$ export SLACK_APP_TOKEN=xoxb-xxx
$ export SLACK_BOT_TOKEN=xapp-xxx

More infos here ๐Ÿ‘‰ https://api.slack.com/bot-users


๐Ÿš€ Usage

API

$ make run-api
[2022-11-22 13:39:20 +0100] [2381451] [INFO] Running on http://127.0.0.1:8000 (CTRL + C to quit)
$ http POST :8000/ask question="Your question here"

Example:

$ http POST :8000/ask question="how cool is elon musk ?"
HTTP/1.1 200
content-length: 127
content-type: application/json
date: Tue, 22 Nov 2022 12:38:45 GMT
ratelimit-limit: 1
ratelimit-remaining: 0
ratelimit-reset: 0
server: hypercorn-h11

{
    "answer": "Elon Musk is a business magnate and entrepreneur who co-founded PayPal and Tesla Motors. He also founded SpaceX..."
}

Website

$ make run-website
[2022-11-22 13:39:48 +0100] [2381963] [INFO] Running on http://127.0.0.1:8000 (CTRL + C to quit)

Then open the url http://127.0.0.1:8000 in your browser

Screenshot:

AMA GTP3

Cli

$ source .venv/bin/activate
$ ./cli.py ask "YOUR QUESTION HERE"

Slack

$ make run-slack

โš’๏ธ Built using


๐Ÿ”ง Testing

$ make dev
$ make test

โœ๏ธ Author

Badr BADRI @pythops


โš–๏ธ License

AGPLv3

Copyright ยฉ 2022 Badr BADRI @pythops


โ„น๏ธ OpenAI Policies

Anyone who is willing to copy this code and launch their own Q&A app, must follow OpenAI going live policy ๐Ÿ‘‰ https://beta.openai.com/docs/going-live

askgpt3's People

Contributors

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