@telnyx/ai-agent-lib 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4414,8 +4414,14 @@ class hn extends xt {
|
|
|
4414
4414
|
*/
|
|
4415
4415
|
async startConversation(e) {
|
|
4416
4416
|
if (!this.telnyxRTC) {
|
|
4417
|
-
|
|
4418
|
-
|
|
4417
|
+
const c = new Error("Client is not initialized.");
|
|
4418
|
+
throw X.error(c.message), this.emit("agent.error", c), c;
|
|
4419
|
+
}
|
|
4420
|
+
if (!this.authenticated || !this.sessionId) {
|
|
4421
|
+
const c = new Error(
|
|
4422
|
+
"Cannot start AI agent conversation before login is complete."
|
|
4423
|
+
);
|
|
4424
|
+
throw X.warn(c.message), this.emit("agent.error", c), c;
|
|
4419
4425
|
}
|
|
4420
4426
|
const n = RTCRtpReceiver.getCapabilities("audio")?.codecs?.find(
|
|
4421
4427
|
(c) => c.mimeType.toLowerCase().includes("opus")
|