Giter Club home page Giter Club logo

amagpt3's Introduction

⚠️ Not maintained anymore ⚠️

Focus shifted to Tenere https://github.com/pythops/tenere




Ask Me Anything GPT-3

A simple wrapper for OpenAI chatgpt

AMA GTP3

🚀 TUI interface

Check out tenere project

💫 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 200 characters


Support

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

Buy Me A Coffee

🔨 Requirements

You'll need to have just installed in your system.

🔌 Installation

Requirements for running amagpt3 in an OCI container (Optional)

You'll need :

API

$ just setup-api

Or, if you want to build the OCI image:

$ just build-api

Website

$ just setup-website

Or, if you want to build the OCI image:

$ just build-website

Cli

$ just setup-cli

Slack Bot

$ just setup-slack

Or, if you want to build the OCI image:

$ just build-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>

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

$ just run-api
[2023-03-18 13:26:30 +0100] [1870524] [INFO] Running on http://127.0.0.1:8000 (CTRL + C to quit)

Or, run the api inside the container

$ just deploy-api

Then use any http client (i'm using httpie in the example below) to interact with API

$ http POST :8000/ask question="Your question here"

Example:

$ http POST :8000/ask question="What is the biggest black hole in the universe ?"
HTTP/1.1 200
content-length: 289
content-type: application/json
date: Sat, 18 Mar 2023 12:29:11 GMT
ratelimit-limit: 1
ratelimit-remaining: 1
ratelimit-reset: 0
server: hypercorn-h11

{
    "answer": "The biggest black hole discovered so far is called TON 618 and it is located about 10.4 billion light-years away from Earth. It has a mass estimated to be around 66 billion times that of the Sun. However, there may be even larger black holes that have not yet been discovered."
}

Website

$ just run-website
[2023-03-18 13:29:59 +0100] [1874551] [INFO] Running on http://127.0.0.1:8000 (CTRL + C to quit)

Or, run the website inside the container

$ just deploy-website

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

$ just run-slack

Or, run the slack bot inside the container

$just deploy-slack

⚒️ Built using


🔧 Testing

$ just dev
$ just test

✍️ Author

Badr BADRI @pythops


⚖️ License

AGPLv3

Copyright © 2022-2023 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

amagpt3's People

Contributors

pythops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amagpt3's Issues

Can you maximize your Q&A length limit?

firstly thank you so much for your awesome work, unfortunately I'm living in xinjiang china (the another side of the earth) and there was a great wall for us, we cannot open google, facebook, twitter even github so we cannot use open ai services,

our situation is hard to explain... our government is prevent us to escape their restrictions...
I can't get a open api key so I want to decide use your website for my personal research, learning purpose but that is limited to 100 character length of Q&A...

thank you again.

Make file error

Makefile:4: recipe for target 'setup-api' failed
make: *** [setup-api] Error 1
root@homelinux:~/amagpt3# python3 -m venv .venv && \

source .venv/bin/activate &&  \
pip3 install -U pip && \
pip3 install -r requirements/common.txt \

Error: Command '['/root/amagpt3/.venv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

Question about deprecation

@pythops have you heard that they are deprecating the answers API December 3, 2022? Do you think you will build a new version of this with the completion or the embedding functions from openai? I am curious to see how you would build it.

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.