Skip to content
This repository was archived by the owner on May 5, 2026. It is now read-only.

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Assistant Streamlit

A Streamlit application that integrates with OpenAI's Assistant API.

Prerequisites

  • Python 3.11+
  • Docker and Docker Compose (for Docker setup)
  • OpenAI API key
  • OpenAI Assistant ID

Environment Setup

  1. Clone the repository
git clone https://github.com/allseeteam/openai-assistant-streamlit
cd openai-assistant-streamlit
  1. Create .env file from example
cp .env.example .env
  1. Configure the .env file with your settings:
# OpenAI Configuration
OPENAI_API_KEY="your-api-key"
OPENAI_ASSISTANT_ID="your-assistant-id"
# OPENAI_PROXY_URL="your-proxy-url"  # Optional: Proxy URL for OpenAI API requests

# Streamlit System Settings
STREAMLIT_SYSTEM_PORT=8501
STREAMLIT_SYSTEM_PASSWORD=your-password

# Streamlit Text Settings
STREAMLIT_TEXTS_PASSWORD_REQUEST="Enter password"
STREAMLIT_TEXTS_PASSWORD_INCORRECT="Incorrect password"
STREAMLIT_TEXTS_TITLE="Demo Application"
STREAMLIT_TEXTS_CHAT_INPUT="Enter message"

Local Development Setup

  1. Create and activate Python virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
python -m streamlit run src/app.py

The application will be available at http://localhost:8501 (or your configured port)

Docker Setup

  1. Build and start the container (using environment variables for port mapping)
docker compose --env-file .env up --build

The application will be available at http://localhost:8501 (or your configured port)

  1. Stop the application
docker compose down
  1. View logs
docker compose logs -f

Development

To modify the application:

  1. For local development, make changes and Streamlit will automatically reload
  2. For Docker setup, rebuild the container after changes:
docker compose --env-file .env up --build

Contributors

Languages