https://github.com/colearendt/shiny-chat
https://github.com/colearendt/shiny-chat
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/colearendt/shiny-chat
- Owner: colearendt
- Created: 2024-09-13T05:11:14.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T12:59:20.000Z (7 months ago)
- Last Synced: 2025-03-17T12:21:57.239Z (about 1 month ago)
- Language: Python
- Size: 20.5 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - colearendt/shiny-chat - (Python)
README
[](https://codespaces.new/colearendt/shiny-chat?quickstart=1)
# Shiny Chat
Using [chatstream](https://github.com/wch/chatstream/tree/main) to show how easy an OpenAI chat app is!!
## Getting Setup
### Load a `virtualenv`
Make sure you have a `virtualenv` loaded!
For example:
```
/opt/python/3.12.3/bin/python -m venv ./venv
source ./venv/bin/activate
```### Install packages
Install packages (just `chatstream` and its dependencies, like `shiny`)
```
pip install -r requirements.txt
```## OpenAI Url
Then determine the `OPENAI_URL` for your OpenAI target.### Personal Use
```
echo "OPENAI_URL=https://api.openai.com/v1/" > .env
```Make sure to set an `OPENAI_API_KEY` in your environment too.
### Workshops
```
echo "OPENAI_URL=http://openai.ai.svc.cluster.local" > .env
```Authentication is handled for you!
## Run the App
Then run the app!
```
shiny run app.py
```## Done!
You should see a Shiny Chat app running, and see the results that look like this:
