This project was created to be thin and enable you to build on top.
It uses Langchain, OpenAI, Flask, and Vercel to KISS and deploy a One-Shot AI server in seconds.
Doesn't have what you're looking for?
Go build it!
Use this flow to yolo deploy to Vercel.
- Fork the repostory.
- Go to Vercel and choose this repository to deploy.
- Go to your Vercel, this project's page & settings after it completes deployment, and configure the Environment Variables by setting.
OPEN_API_KEY=your-api-key
- Curl your endpoint and test your server!
curl -X POST https://flaskgpt-your-account-vercel.app/api/prompt -H "Content-Type: application/json" -d "{\"prompt\": \"What is the funniest joke you've ever heard?\"}"
- Have fun!
Use this flow to run the server locally and test it.
- Clone the repository onto your local filesystem.
- Configure your .env by setting
OPEN_API_KEY=your-api-key
- Setup your venv and activate it
python3 -m venv venv
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Start your server
python3 flaskGPT.py
- Start a new terminal
- In your 2nd terminal, curl your server
curl -X POST https://flaskgpt-your-account-vercel.app/api/prompt -H "Content-Type: application/json" -d "{\"prompt\": \"What is the funniest joke you've ever heard?\"}"
- Have fun!