From an Interesting project implements internal GPTs along with media uploads, providing accessible AI / GPT code. Run it on streamlit with some small mods from another project to finesse the student access to secure keys on openai API. Proxy is used to swap an easily acquired proxy-token for much harder to get api key on openai.
A second project detailed below at the hosted proxy link makes it possible for students to sign up, getting a token that is used as a front-end call in place of native calls on the openai API. This is an example of a reverse proxy sitting in front of a protected resource, which openai API is until you have a working api key.
Get started by following instructions below:
git clone https://github.com/rowntreerob/accel-sf.git
pip install -r requirements.txt
go to the discord server mentioned in the link
sign up and wait for 10 min to elapse
follow instructions to get a personal key to use with the reverse proxy
this key used as **OPENAI_API_KEY** in conjunction with api calls to endpt. below
api.pawan.krd/v1/completions # note calls on the proxy are relayed to openai
Get an account on twilio
use the dashboard for account, SID, and token
the sample app uses Twilio sms
dashboard will create/list your twilio phone number
create toml file at project path above
on streamlit run on localhost
3 env vars below will be read by the runtime and passed to st.secrets
OPENAI_API_KEY = "<your-key>"
TWILIO_ACCOUNT_SID = "<your-value>"
TWILIO_AUTH_TOKEN = "<your-token>"
rob@penguin:~/src/accelerate-sf-hackathon-streamlit$ streamlit run app.py
stdout--
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://100.115.92.199:8501
Brief instructions with the app