@telnyx/ai-agent-lib 0.3.0-beta.1 → 0.3.1-beta.1
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/client.d.ts +13 -0
- package/dist/index.js +2447 -2081
- package/package.json +3 -3
package/dist/client.d.ts
CHANGED
|
@@ -12,6 +12,14 @@ export type TelnyxAIAgentConstructorParams = {
|
|
|
12
12
|
* Voice Activity Detection options for controlling speech detection and latency measurement.
|
|
13
13
|
*/
|
|
14
14
|
vad?: VADOptions;
|
|
15
|
+
/**
|
|
16
|
+
* When true, the client connects in receive-only mode (no microphone).
|
|
17
|
+
* The WebRTC peer will negotiate audio as `recvonly` so the agent's audio
|
|
18
|
+
* is still received, but no local microphone permission is requested.
|
|
19
|
+
* Useful for chat-only / text-only experiences where you interact with
|
|
20
|
+
* the AI agent via `sendConversationMessage()`.
|
|
21
|
+
*/
|
|
22
|
+
chatMode?: boolean;
|
|
15
23
|
};
|
|
16
24
|
export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
|
|
17
25
|
private telnyxRTC;
|
|
@@ -22,6 +30,11 @@ export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
|
|
|
22
30
|
debug: boolean;
|
|
23
31
|
private audioStreamMonitor;
|
|
24
32
|
activeCall: Call | null;
|
|
33
|
+
/**
|
|
34
|
+
* When true, the client operates in chat-only mode (no microphone).
|
|
35
|
+
* Audio is negotiated as recvonly so agent speech can still be received.
|
|
36
|
+
*/
|
|
37
|
+
chatMode: boolean;
|
|
25
38
|
constructor(params: TelnyxAIAgentConstructorParams);
|
|
26
39
|
/**
|
|
27
40
|
* Connects to the Telnyx WebRTC service and establishes a session with the AI agent.
|