A beautiful, themeable, and user-friendly R Shiny interface for interacting with OpenAI's Chat Completions API.
Inspired by the official OpenAI Playground, this app supports:
- β Chat with GPT models (gpt-3.5-turbo, gpt-4, gpt-4o, etc.)
- π¨ Light/Dark theme toggle (with local storage memory)
- π Loading spinner while waiting for API
- π¬ Chat history with styled bubbles
- βοΈ Adjustable temperature, max tokens, and system prompt
- π€ Download chat history
- π§Ό Clear chat button
- π§© Responsive layout with custom styling
The clean and intuitive UI is designed to make interactions seamless and visually appealing.
- R β₯ 4.0
- Shiny
- shinyjs
- httr
- jsonlite
Experience ShinyChatGPT live on Shinyapps.io!
π Launch the App on shinyapps.io
Follow these steps to run ShinyChatGPT on your local machine:
- R: Ensure you have R installed. You can download it from the R project website.
- RStudio IDE (Recommended): While not strictly necessary, RStudio provides a user-friendly environment for R development. Download it from the RStudio website.
Open your terminal or command prompt and run the following commands:
git clone https://github.com/tolgakurtuluss/shinychatgpt.git
cd shinychatgptYou need to install the R packages listed in the "Dependencies" section. Open R or RStudio and run the following command in the R console:
install.packages(c("shiny", "shinyjs", "httr", "jsonlite"))There are a couple of ways to run the app:
- Using RStudio:
- Open the
shinychatgpt.Rfile in RStudio. - Click the "Run App" button that appears at the top of the script editor.
- Open the
- Using the R Console:
- Navigate to the project directory (
shinychatgpt) in your R console. - Run the command:
shiny::runApp()
- Navigate to the project directory (
Once the app is running, it should open in your default web browser.


