Here is a free and publicly available instance that you can play with
Note: I put some limitations to avoid explode my budget. the question and the answer has a max of 100 characters
If you enjoy amagpt3 and you want to support it, you can buy me a coffe
$ make setup-api
$ make setup-website
$ make setup-cli
$ make setup-slack
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
$ 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..."
}
$ 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:
$ source .venv/bin/activate
$ ./cli.py ask "YOUR QUESTION HERE"
$ make run-slack
$ make dev
$ make test
Badr BADRI @pythops
AGPLv3
Copyright ยฉ 2022 Badr BADRI @pythops
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