OpenAI has just rolled out a WebRTC interface for their real-time API, now with tool-calling capabilities—so you can invoke JavaScript functions directly on the client side. This unlocks a host of exciting new possibilities.
In this Youtube video, Craig demonstrates how he set up a Cloudflare Worker to securely forward the WebRTC stream. He then uses function calls to dynamically adjust a webpage’s design and even operate a Bluetooth-connected robotic hand.