ShinyChatGPT is a fully functional ChatGPT clone built entirely in R using the Shiny framework. It provides a clean, interactive web interface to OpenAI’s Chat Completions API, allowing you to chat with models like GPT-3.5-turbo, GPT-4, and GPT-4o directly from your browser.
Chat Screen (Dark Mode)

Chat Screen (Light Mode)

Chat Interface

Key Features:
- Modern chat interface with styled message bubbles
- Light/dark theme toggle (saved in browser)
- Adjustable parameters: temperature, max tokens, and custom system prompt
- Loading spinner during API responses
- Download chat history as a file
- Clear chat functionality
- Fully responsive design
The app is lightweight, requires only a few R packages (shiny, shinyjs, httr, jsonlite), and can be run locally in seconds. Just set your OpenAI API key as an environment variable and launch it.It’s a great example of how to integrate powerful LLMs into R-based web applications without needing Python or JavaScript frameworks.Try the live demo or run it yourself!
View Repository on GitHub