Skip to content

Example Rack App for connecting the OpenAI realtime API to twilio using Falcon server.

Notifications You must be signed in to change notification settings

n-at-han-k/ruby-twilio-openai-realtime-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Twilio OpenAI Realtime Example

This is an example Rack server demonstrate bi-directional asynchronous streaming in ruby using websockets. We use the falcon server and the asyc gem.

Setup

Add your OpenAI API key to the .env file.

OPENAI_API_KEY=abcdefghijklexample
HOST=example.ngrok.com

Then run

bin/server

You'll need to set up your twilio webhooks to point to your server. If you're on a local dev machine then you can use NGrok to connect your localhost to a public url.

ngrok http localhost:9292

Twilio Dev Phone

Twilio provide a brilliant application called dev phone for testing calling numbers using your web browser. Install the Twilio CLI. Then run the following command:

twilio dev-phone

About

Example Rack App for connecting the OpenAI realtime API to twilio using Falcon server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages