https://github.com/tolgakurtuluss/shinychatgpt
The OpenAI Playground - ChatGPT Clone with Shiny application is built using the R programming language and the Shiny framework.
https://github.com/tolgakurtuluss/shinychatgpt
chatgpt gpt-4 shiny shinyapps
Last synced: 3 months ago
JSON representation
The OpenAI Playground - ChatGPT Clone with Shiny application is built using the R programming language and the Shiny framework.
- Host: GitHub
- URL: https://github.com/tolgakurtuluss/shinychatgpt
- Owner: tolgakurtuluss
- Created: 2023-03-30T12:13:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T11:17:09.000Z (about 1 year ago)
- Last Synced: 2024-10-28T14:40:29.145Z (about 1 year ago)
- Topics: chatgpt, gpt-4, shiny, shinyapps
- Language: R
- Homepage: http://tolgakurtuluss.shinyapps.io/shinychatgpt
- Size: 45.9 KB
- Stars: 14
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - tolgakurtuluss/shinychatgpt - The OpenAI Playground - ChatGPT Clone with Shiny application is built using the R programming language and the Shiny framework. (R)
README
# ShinyChatGPT - OpenAI ChatGPT Clone with Shiny
A beautiful, themeable, and user-friendly R Shiny interface for interacting with OpenAI's Chat Completions API.
Inspired by the official [OpenAI Playground](https://platform.openai.com/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
---
## ๐ App Interface
The clean and intuitive UI is designed to make interactions seamless and visually appealing.
Dark Mode Example

White Mode Example

Chat Interface Example

---
## ๐ฆ Requirements
- R โฅ 4.0
- Shiny
- shinyjs
- httr
- jsonlite
---
## ๐ Try It Out on shinyapps.io
Experience ShinyChatGPT live on Shinyapps.io!
๐ [Launch the App on shinyapps.io](https://tolgakurtuluss.shinyapps.io/shinychatgpt/)
---
## ๐ Running Locally
Follow these steps to run ShinyChatGPT on your local machine:
### 1. Prerequisites
- **R:** Ensure you have R installed. You can download it from [the R project website](https://www.r-project.org/).
- **RStudio IDE (Recommended):** While not strictly necessary, RStudio provides a user-friendly environment for R development. Download it from [the RStudio website](https://posit.co/download/rstudio-desktop/).
### 2. Clone the Repository
Open your terminal or command prompt and run the following commands:
```bash
git clone https://github.com/tolgakurtuluss/shinychatgpt.git
cd shinychatgpt
```
### 3. Install Dependencies
You need to install the R packages listed in the "Dependencies" section. Open R or RStudio and run the following command in the R console:
```R
install.packages(c("shiny", "shinyjs", "httr", "jsonlite"))
```
### 4. Run the App
There are a couple of ways to run the app:
- **Using RStudio:**
1. Open the `shinychatgpt.R` file in RStudio.
2. Click the "Run App" button that appears at the top of the script editor.
- **Using the R Console:**
1. Navigate to the project directory (`shinychatgpt`) in your R console.
2. Run the command: `shiny::runApp()`
Once the app is running, it should open in your default web browser.