Skip to content

"Streamlit-powered, plug-and-play ChatGPT bot – chat, upload files, customize personality, BYO OpenAI key"

License

Notifications You must be signed in to change notification settings

simsara-org/streamlit-gpt-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamlit GPT Chat

A simple, customizable ChatGPT web app built with Streamlit. Chat, upload documents, set bot personality, and more—all with your own OpenAI API key.

Author: Patrick Peluse / Simsara
Website: https://simsara.com
Repo: https://github.com/simsara-org/streamlit-gpt-chat

If this tool saves you time consider supporting or contributing:

ADA: addr1q9v8ymz760w2a8ja9g0znchgxf42uj27p8cvx6p2jq9dgt672djtjn96uawdpaq2xn54vr6rkd24ej7rcxz29cly55mqm0vjlp

Features

  • Chat with available API GPT-3.5/4/5 and every release via your own OpenAI API key (never share your key!)
  • Upload documents (PDF, Word, Images, Text) for contextual Q&A
  • Multiple bot personalities—choose playful, formal, technical, and more
  • Download your chat history as JSON, Markdown, txt
  • Resume any session previous session, Use Multiple Models in one chat
  • Chunking built in for large bodies of text
  • Local-first (no user data stored; all computation in your browser/your API key)

Quick Start

Recommended: Use a virtual environment for dependencies.

Linux

python3 -m venv .venv
source .venv/bin/activate

Windows Powershell

.\venv\Scripts\Activate.ps1
  1. Clone the repo:
git clone https://github.com/simsara-org/streamlit-gpt-chat
cd streamlit-gpt-chat
  1. Install requirements (ideally in a virtualenv):
pip install -r requirements.txt
  1. Set your OpenAI API key: The app will prompt for it when running, OR set an environment variable:

Linux

export OPENAI_API_KEY="sk-..."

Windows Powershell

[System.Environment]::SetEnvironmentVariable('OPENAI_API_KEY', 'sk-...', 'User')

or (Alternative API Location)

user@user-ms1111:~/streamlit-gpt-chat/.streamlit$ 
.
└── secrets.toml

  1. Run the app:
streamlit run main.py
  1. Open your browser to the local address provided.

Docker Setup

1. Clone the repository

git clone https://github.com/simsara-org/streamlit-gpt-chat
cd streamlit-gpt-chat

2. Build the Docker image

docker build --no-cache -t gpt-chat .

3. Run the container

docker run \
  -p 8501:8501 \
  -e OPENAI_API_KEY="$OPENAI_API_KEY" \
  gpt-chat

4. Open the app

Local:

http://localhost:8501

WSL / LAN:

http://0.0.0.0:8501

5. Stop the container

Ctrl+C

Or list/stop:

docker ps
docker stop <container_id>

6. Rebuild after edits

docker build --no-cache -t gpt-chat .

License

MIT


Leave suggestions/bug reports as GitHub issues!

About

"Streamlit-powered, plug-and-play ChatGPT bot – chat, upload files, customize personality, BYO OpenAI key"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •