Focus shifted to Tenere https://github.com/pythops/tenere
Check out tenere project
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 200 characters
If you enjoy amagpt3 and you want to support it, you can buy me a coffe
You'll need to have just installed in your system.
You'll need :
$ just setup-api
Or, if you want to build the OCI image:
$ just build-api
$ just setup-website
Or, if you want to build the OCI image:
$ just build-website
$ just setup-cli
$ just setup-slack
Or, if you want to build the OCI image:
$ just build-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>
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
$ 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."
}
$ 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:
$ source .venv/bin/activate
$ ./cli.py ask "YOUR QUESTION HERE"
$ just run-slack
Or, run the slack bot inside the container
$just deploy-slack
$ just dev
$ just test
Badr BADRI @pythops
AGPLv3
Copyright © 2022-2023 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