Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/ai-openai/src/realtime/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async function createWebRTCConnection(
// Send SDP to OpenAI and get answer. `offer.sdp` is `string | undefined` per
// the WebRTC type definitions; coerce to `null` (which `RequestInit.body`
// accepts) under exactOptionalPropertyTypes.
const sdpResponse = await fetch(`${OPENAI_REALTIME_URL}?model=${model}`, {
const sdpResponse = await fetch(`${OPENAI_REALTIME_URL}/calls`, {
method: 'POST',
headers: {
Authorization: `Bearer ${token.token}`,
Expand Down Expand Up @@ -586,7 +586,7 @@ async function createWebRTCConnection(
},

updateSession(config: Partial<RealtimeSessionConfig>) {
const sessionUpdate: Record<string, unknown> = {}
const sessionUpdate: Record<string, unknown> = { type: 'realtime' }

if (config.instructions) {
sessionUpdate.instructions = config.instructions
Expand Down