Loading…
Topic
OpenAI API
13 posts about OpenAI API. Every summary links to the original.
- 13 posts
- 3 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
How to Test and Fix Voice AI Agent Prompts with Twilio Conversation Relay and Cekura
This tutorial demonstrates building a voice AI agent with Twilio Conversation Relay, Node.js, and the OpenAI API, then testing and fixing its prompts using Cekura automated platform, a Twilio Startup Searchlight award winner. Conversation Relay manages real-time voice tasks like speech-to-text, text-to-speech, interruption detection, and turn management over WebSockets, while developers control business logic, tools, and AI integration. Cekura defines evaluation metrics, generates test conversations with realistic caller scenarios—interruptions, topic changes, and unexpected requests—and runs baseline tests to uncover prompt gaps. After analyzing failure reports, developers update the system prompt and re-run tests; fixing a fee-waiver bug raised the pass rate from below 70% to the 90-95% target in one refinement. The tutorial emphasizes that prompts are source code requiring version control and automated testing for reliable voice AI agent behavior.
From better privacy to our new ChatGPT plugin, here's what's new on Stack Overflow for Agents
Stack Overflow for Agents is an API-first knowledge exchange designed to address the “ephemeral intelligence gap,” in which agents lose solutions when a session’s context window disappears. The platform preserves agent-generated knowledge and adds trust scores, validation gateways, reputation-linked posts, and steering context to encourage verification and corrections. After three months, Stack Overflow has introduced a ChatGPT plugin that packages its existing skills into one installable OpenAI capability, plus Playbooks for structured procedural workflows distinct from Blueprints and TILs. New controls let users choose whether agents post locally, save drafts, request review before publishing, or post autonomously; read-only access supports proprietary work. The team says agents are already using and improving shared knowledge, but it is still seeking conclusive, quantifiable evidence of the platform’s value.
How to Orchestrate Multi-Call Conversations with an LLM and Twilio Conversation Memory
The tutorial builds a C# .NET 9 ASP.NET Core voice service that preserves caller context, preferences, and action history across separate inbound calls. It combines Twilio Conversation Relay and a Twilio Conversation Memory Store with an OpenAI gpt-4o-mini service, using WebSockets to connect the call flow and stream generated text. The setup covers creating the project, installing Twilio, DotNetEnv, and OpenAI packages, configuring credentials and IDs in .env, exposing local webhooks with ngrok, and routing /voice to /ws. The sample assistant is framed as Owlbert's Auto Repair and is instructed to speak naturally, avoid lists and emojis, refer to caller details, and acknowledge uncertainty rather than guess. Testing uses two calls from the same number; the expected result is that the second call recalls first-call details and that Twilio shows a stored conversation summary.
How to Connect Your Twilio Agent to External APIs
This tutorial shows how to connect a Twilio voice agent to an external REST API so it can retrieve live information during a conversation. It uses C# .NET 9, Twilio Conversation Relay, WebSockets, OpenAI tool calling, and the authentication-free Cat Facts API as a demonstration. An ASP.NET Core application exposes a /voice webhook, connects calls to a /ws endpoint, maintains conversation messages, streams model responses, and executes get_cat_fact by requesting and parsing JSON from the Cat Facts service. The guide also covers environment variables, NuGet dependencies, ngrok tunneling, Twilio number configuration, and troubleshooting for webhook URLs and API keys. After setup, callers can ask for a cat fact and receive one from the external service, illustrating how function tools can give voice agents real-time data and perform API-backed work.
How to Orchestrate Multi-Call Conversations with an LLM and Twilio Conversation Memory in Python
The tutorial builds a Python FastAPI voice service that preserves caller context, preferences, and action history across separate inbound calls using Twilio Conversation Memory. It connects a Twilio phone number to a /voice webhook and /ws WebSocket through Conversation Relay, then uses an asynchronous OpenAI client with gpt-4o-mini to generate streamed responses. A memory service retrieves stored information by caller number, while each completed call is summarized and written back to the configured memory store. The example uses an auto-repair assistant whose system prompt incorporates prior context before the next call, and the test procedure checks that a second call recalls details from the first. The setup requires Python 3.11 or later, Twilio and OpenAI credentials, a memory-store and configuration ID, and ngrok for exposing local webhooks.
How to Connect Your Twilio Agent to External APIs in Node.js
Voice agents can converse, but they need external APIs to retrieve live information or take actions such as checking inventory or booking appointments. This tutorial builds a Node.js voice agent with Twilio Conversation Relay, Express, WebSockets, and the OpenAI Node.js SDK. A Conversation Relay WebSocket handler collects voice prompts, maintains conversation messages, streams model output back to the call, and defines a get_cat_fact tool that fetches JSON from the unauthenticated Cat Facts REST API. The service returns the fetched fact or an error message, while TwiML connects Twilio's voice-capable number to the WebSocket endpoint. Testing uses Node.js 18+, an OpenAI API key, ngrok, and a POST /voice webhook; the stated result is that callers can ask for a cat fact and hear the API response.
How to Orchestrate Multi-Call Conversations with an LLM and Twilio Conversation in Node.js Memory
Disconnected voice calls can force callers to repeat information, creating friction for AI phone agents. It builds a Node.js Express service that preserves caller context, preferences, and action history across separate inbound calls using Twilio Conversation Memory. The implementation uses Express and express-ws for HTTP and WebSocket handling, the OpenAI SDK with gpt-4o-mini for streamed responses and summaries, and axios for Twilio’s Conversation Memory REST API; a memory store ID and other credentials are configured through environment variables. The sample application connects Twilio’s Conversation Relay to an auto-repair assistant, retrieves prior context for recognized callers, and logs a summary when a call ends. Testing involves two calls from the same phone number to verify that the second call recalls details from the first.
How to Connect Your Twilio Agent to External APIs in Python
Voice agents can converse, but need external APIs to retrieve live data or take actions such as checking inventory and booking appointments. This tutorial builds a Python and FastAPI voice agent with Twilio Conversation Relay, OpenAI tool calling, and an unauthenticated Cat Facts REST API. A FastAPI webhook returns TwiML that connects callers to a websocket, while Conversation Relay messages are converted into conversation history and streamed responses. When the model requests a cat fact, the application executes the tool, sends its result back to OpenAI, and streams the follow-up answer to the caller. The setup uses environment variables for the OpenAI key, httpx for asynchronous external requests, and ngrok to expose local webhooks; the completed test lets a caller ask for and receive a cat fact.
How to Connect Your Twilio Agent to External APIs with PHP
The tutorial shows how to connect a Twilio voice agent to external REST APIs so an LLM-driven conversation can retrieve live information or support actions such as checking inventory or booking appointments. It builds the example in PHP 8.5 or later with OpenSwoole, Twilio Conversation Relay, OpenAI, and a WebSocket server, using Cat Facts as an unauthenticated API. The application exposes a POST /voice webhook that returns TwiML and connects Conversation Relay to a wss /ws endpoint, while session handling passes caller prompts into the OpenAI service. Tool calling routes the request to the Cat Facts endpoint, parses the JSON fact field, and returns either the fact, “No fact returned.”, or an error when the API response is unsuccessful or unavailable. Testing requires running php server.php, exposing port 8080 with ngrok, and configuring the Twilio number’s incoming webhook to /voice; the conclusion says external HTTP endpoints give agents real-time data.
How to Orchestrate Multi-Call Conversations with an LLM and Twilio Conversation Memory with PHP
This tutorial shows how to build a PHP voice agent that retains caller context, preferences, and action history across separate inbound calls. It uses Twilio Conversation Memory with a Memory Store, an Open Swoole service, Twilio ConversationRelay, and an OpenAI integration using gpt-4o-mini; the example models an auto-repair shop assistant. The OpenAI service appends supplied prior customer context to its system prompt, while streamed responses are sent through a WebSocket and environment variables provide API credentials and the Memory Store ID. After running the service on port 9501, exposing it with ngrok, and configuring the phone-number webhook, the tutorial tests two calls from the same number and says the second call should remember details from the first.
Build Voice AI Experiences with Twilio and GPT-Live-1 in the OpenAI API
The post introduces a Twilio Agent Connect integration for building production-ready voice AI experiences with OpenAI’s GPT-Live-1 speech-to-speech model. It addresses the gap between real-time speech intelligence and customer-facing communications by connecting GPT-Live-1 to Twilio Voice and Conversations while preserving context across channels and supporting reliable scale. The SDK supplies a native GPTLiveProvider that links Twilio Voice Media Streams directly to the OpenAI API without custom WebSocket plumbing, and handles turn-taking, audio streaming, interruption handling, and tool delegation. Tutorials, documentation, and example repositories cover inbound and outbound agents implemented with Python and Node.js, giving developers materials to build, test, and deploy voice applications.
Make Outbound Calls with Twilio Voice and Media Streams, GPT-Live-1 in the OpenAI API, and Node.js
This tutorial shows how to build an outbound AI voice agent that uses Twilio Programmable Voice and Media Streams to call a permitted phone number, rather than waiting for inbound calls. It connects the call to GPT-Live-1 in the OpenAI API through a Node.js server, with Fastify, ws, dotenv, and the Twilio helper library handling the application and relay. The implementation reads the destination from a --call flag, validates E.164 formatting, exposes the server through a public tunnel, and uses environment variables for credentials and the calling number. Owlie identifies itself as an AI assistant, retrieves a callback note with get_callback_reason, delegates factual questions to hosted web_search, and can be interrupted during speech. The completed demo rings the chosen number, explains why it is calling, and can return random callback notes or web-searched answers, while the tutorial stresses verified numbers, model access, and outbound-calling compliance.
How I Built an Okta Documentation Chatbot in Python
Okta developer documentation contains information developers need for integrations, but the author observed that it was underused. They built Oktanaut, a Python chatbot in Jupyter Notebook, comparing a LlamaIndex-based prototype trained on Okta documentation with a GPT-3.5-powered version using the OpenAI API. The first favored precision for focused questions, while the second handled a broader range; the final demo used OpenAI API for its larger models and user-friendly experience. For both versions, the author curated questions, answers, and support engineer information, stored training data in Google Drive for Colab, and retained historical interactions so replies could use session context. Panel provided the frontend, and the author chose Jupyter Notebook for simple setup despite noting bugs and glitches.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.