SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Is Node.js Supported for Agent Connect GPT-Live Without Python?

Question

Is native TypeScript/Node.js supported for integrating Twilio Agent Connect with OpenAI GPT-Live, or is a Python gateway required because GPTLiveProvider is specific to the Python SDK?

 

Product

Twilio Agent Connect

 

Answer

Native TypeScript/Node.js is supported, and you don't need a Python gateway.

GPTLiveProvider isn't specific to Python. Starting with Twilio Agent Connect TypeScript SDK v2.4.0, the twilio-agent-connect npm package includes the same GPT-Live provider as the Python SDK. It connects Twilio Media Streams directly to GPT-Live and handles interruptions, turn-taking, and tool-call delegation.

If you're running Python middleware only to reach GPT-Live, you can remove it:

  1. Use Node.js 22.13 or later.
  2. Upgrade the SDK to v2.4.0 or later: npm install twilio-agent-connect@latest
  3. Import the GPT-Live configuration from the SDK:

    import {
      TAC,
      TACConfig,
      TACServer,
      VoiceChannel,
      GPTLiveProviderConfig,
      TWILIO_AUDIO_FORMAT_FOR_GPT_LIVE
    } from 'twilio-agent-connect';
  4. Pass a GPTLiveProviderConfig to VoiceChannel. VoiceChannel works with any provider: the config you pass decides whether it runs Conversation Relay, GPT Realtime, or GPT-Live.

You also need an OpenAI API key from a project that has GPT-Live access.

To implement native GPT-Live support and remove the Python middleware, follow the native implementation architecture provided in the official examples repository: Twilio Agent Connect TypeScript GPT-Live Example.

 

Additional Information

Have more questions? Submit a request
Powered by Zendesk