https://github.com/smithclay/llm-chat-react-vercel
Simple LLM chat application with a python backend and react frontend, deployable on Vercel
https://github.com/smithclay/llm-chat-react-vercel
gpt-4 openai-api react whisper-ai
Last synced: 7 months ago
JSON representation
Simple LLM chat application with a python backend and react frontend, deployable on Vercel
- Host: GitHub
- URL: https://github.com/smithclay/llm-chat-react-vercel
- Owner: smithclay
- Archived: true
- Created: 2023-04-02T05:30:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-06T04:05:07.000Z (over 2 years ago)
- Last Synced: 2025-02-14T02:53:20.779Z (8 months ago)
- Topics: gpt-4, openai-api, react, whisper-ai
- Language: TypeScript
- Homepage: https://llm-chat.vercel.app
- Size: 516 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LLM Chat with React, OpenAI, and Vercel
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fsmithclay%2Fllm-chat-react-vercel&env=OPENAI_API_KEY&envDescription=API%20Keys%20needed)
This is an example of a conversational (with voice!) React app that calls a simple serverless backend written in Python.
The backend automatically gets deployed to appropraite endpoint if using [Vercel](https://vercel.com). Use the "Deploy" button above to deploy it to your own project.
## Setup
* You will need an OpenAI API token set to the `OPENAI_API_KEY` env variable. This app uses the GPT-4 model.
* If have `gpt-4` API access, set the `OPENAI_API_MODEL` env var to `gpt-4`, otherwise it will use `gpt-3.5-turbo`.```bash
npm install
```## Running locally
```bash
# This starts the backend
npm i -g vercel
vercel dev
```## Deploying
```bash
# Only need to set the key once
vercel env add OPENAI_API_KEY
vercel deploy
```