A feature-rich web application for interacting with OpenAI's Realtime API, featuring a flexible tools system and universal webhook integration.
- π¬ Real-time chat interface with OpenAI's latest models
- π§ Extensible tools system to augment AI capabilities
- π Integrated web search capability
- πͺ Universal webhook system to connect any API
- π¨ Color palette generation tool
- π Clipboard manager for saving and organizing information
- π Current date and time in multiple formats and timezones
- π Automatic proxy routing for external APIs (avoids CORS issues)
- π Dark/light mode themes
- Node.js (v18+)
- An OpenAI API key with access to the Realtime API
- (Optional) A SearXNG instance for web search capability
-
Clone the repository:
git clone https://github.com/bigsk1/openai-realtime-ui.git cd openai-realtime-ui
-
Install dependencies:
npm install
-
Create a
.env
file in the project root with your API keys:OPENAI_API_KEY=your_openai_api_key_here # Optional SEARXNG_URL=your_searxng_url_here # Optional, set to mini model for lower cost # gpt-4o-mini-realtime-preview-2024-12-17 OPENAI_REALTIME_MODEL=gpt-4o-realtime-preview-2024-12-17
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
For local development with hot reloading:
-
Clone the repository:
git clone https://github.com/bigsk1/openai-realtime-ui.git cd openai-realtime-ui
-
Create a
.env
file with your API keys:OPENAI_API_KEY=your_openai_api_key_here # Optional SEARXNG_URL=your_searxng_url_here # Optional, set to mini model for lower cost # gpt-4o-mini-realtime-preview-2024-12-17 OPENAI_REALTIME_MODEL=gpt-4o-realtime-preview-2024-12-17
-
Start the development container:
docker-compose up -d --build
-
Access the application at http://localhost:3000
The development container mounts your local files, so any changes you make will trigger hot reloading.
You can choose between different OpenAI Realtime models by setting the OPENAI_REALTIME_MODEL
environment variable:
gpt-4o-realtime-preview-2024-12-17
(default): More powerful modelgpt-4o-mini-realtime-preview-2024-12-17
: Faster, lower cost model
This application features an extensible tools system that allows the AI to perform various actions beyond just conversation.
- Web Search: Search the web for current information
- Color Palette: Generate color schemes based on themes
- Webhook Call: Universal tool to connect with any external API
- Current DateTime: Get precise date and time in various formats and timezones
- Clipboard Manager: Save and manage text snippets for easy recall and organization
The Webhook Manager allows you to configure custom API endpoints that the AI can interact with, without any coding:
- Open the application and scroll to the "Webhook Endpoints Manager" section
- Add new webhooks with:
- Endpoint Key: A unique identifier for the webhook (e.g.,
btc-price
) - URL: The API endpoint URL (e.g.,
https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
) - Method: The HTTP method to use (GET/POST/ANY)
- Authentication Method: Choose the appropriate authentication for your API:
- No Authentication: For public APIs that don't require authentication
- API Key: Send an API key in a custom header (default: X-API-Key)
- Basic Auth: Username/password authentication using the Basic scheme
- Bearer Token: JWT or OAuth token authentication using the Bearer scheme
- Custom Header: Any custom authentication header and value
- Description: Detailed explanation of the webhook's purpose and required parameters, use payload to describe the data to send to the webhook.
- Endpoint Key: A unique identifier for the webhook (e.g.,
All authentication credentials are stored securely in your browser's localStorage and are only sent to the specified API endpoints.
Here are some example webhook configurations for common APIs:
Endpoint Key: weather
URL: https://api.weatherapi.com/v1/current.json
Method: GET
Auth Method: API Key
API Key Header Name: key
API Key: your_api_key_here
Endpoint Key: github-repos
URL: https://api.github.com/user/repos
Method: GET
Auth Method: Bearer Token
Bearer Token: your_github_personal_access_token
Endpoint Key: private-api
URL: https://your-api.example.com/data
Method: GET
Auth Method: Basic Auth
Username: your_username
Password: your_password
The Current DateTime tool provides precise time information in various formats and timezones. This is particularly useful for:
- Getting the exact current time in different timezones
- Formatting dates for various purposes (human-readable, ISO, UNIX timestamp)
- Including timestamps in documents or data analysis
- Time-sensitive tasks where accuracy is important
The AI can retrieve time information using the following parameters:
-
Format: Choose from several time formats
iso
: ISO 8601 format (default)human
: Readable format with day, date, and timeunix
: UNIX timestamp (seconds since epoch)date
: Date only in long formattime
: Time only with timezone
-
Timezone: Select from common timezones
local
: Browser's local timezone (default)utc
: Coordinated Universal Timeest
: Eastern Standard Time (US)cst
: Central Standard Time (US)mst
: Mountain Standard Time (US)pst
: Pacific Standard Time (US)
Example prompts:
- "What's the current time in UTC?"
- "Give me the current date and time in human-readable format"
- "I need a UNIX timestamp for right now"
The Clipboard Manager provides a convenient way to save and organize text content during your conversations with the AI. This feature is particularly useful for:
- Saving important information for later reference
- Collecting multiple pieces of information during a session
- Organizing research findings, code snippets, or summaries
The AI can interact with the clipboard using the following commands:
- Save text:
clipboard_manager
withsave
action - List saved items:
clipboard_manager
withlist
action - Get a specific entry:
clipboard_manager
withget
action and an entry ID - Delete an entry:
clipboard_manager
withdelete
action and an entry ID - Clear all entries:
clipboard_manager
withclear
action
All clipboard entries are stored locally in your browser and persist between sessions. You can also export and import your clipboard history for backup or transfer to another device.
Example prompts:
- "Save this research summary to the clipboard"
- "Show me all the items in my clipboard"
All external API requests are automatically routed through the application's built-in proxy to prevent CORS issues, with no configuration needed.
The AI can automatically chain multiple tools together. For example, when asking about weather in a city:
- First uses the geocoding webhook to convert the city name to coordinates
- Then uses the weather webhook with those coordinates to get the forecast
βββ client/ # Front-end React application
β βββ components/ # React components
β βββ lib/ # Client-side utilities and tools definitions
β βββ styles/ # CSS and styling
βββ docs/ # Documentation
βββ server.js # Express server and API endpoints
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose configuration
βββ .env # Environment variables (create this)
See docs/tools-guide.md for detailed instructions on how to create new tools and extend the application's capabilities.