From f80b02a712fb7ffc9c0e48fd9747d29761842d4c Mon Sep 17 00:00:00 2001 From: Keith Schacht Date: Tue, 25 Jun 2024 15:46:46 -0500 Subject: [PATCH] Fix parameter names in App.tsx --- src/App.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ea594a82..747ece94 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,8 +5,8 @@ import { RetellWebClient } from "retell-client-js-sdk"; const agentId = "YOUR_AGENT_ID"; interface RegisterCallResponse { - callId?: string; - sampleRate: number; + call_id?: string; + sample_rate: number; } const webClient = new RetellWebClient(); @@ -46,11 +46,11 @@ const App = () => { webClient.stopConversation(); } else { const registerCallResponse = await registerCall(agentId); - if (registerCallResponse.callId) { + if (registerCallResponse.call_id) { webClient .startConversation({ - callId: registerCallResponse.callId, - sampleRate: registerCallResponse.sampleRate, + callId: registerCallResponse.call_id, + sampleRate: registerCallResponse.sample_rate, enableUpdate: true, }) .catch(console.error); @@ -70,7 +70,7 @@ const App = () => { "Content-Type": "application/json", }, body: JSON.stringify({ - agentId: agentId, + agent_id: agentId, }), }, );