@telnyx/ai-agent-lib 0.1.8 → 0.1.9
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/README.md +3 -1
- package/dist/client.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1698 -1623
- package/dist/react/client-context.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -147,6 +147,7 @@ function VoiceChat() {
|
|
|
147
147
|
| `agentId` | `string` | ✅ | - | Your Telnyx AI agent ID |
|
|
148
148
|
| `versionId` | `string` | ❌ | `"main"` | Agent version to use |
|
|
149
149
|
| `environment` | `"production" \| "development"` | ❌ | `"production"` | Telnyx environment |
|
|
150
|
+
| `debug` | `boolean` | ❌ | `false` | Enable debug logging |
|
|
150
151
|
|
|
151
152
|
### Hooks
|
|
152
153
|
|
|
@@ -245,7 +246,8 @@ await agent.startConversation({
|
|
|
245
246
|
customHeaders: [
|
|
246
247
|
{ name: 'X-User-Plan', value: 'gold' },
|
|
247
248
|
{ name: 'X-Session-Id', value: 'session-abc' }
|
|
248
|
-
]
|
|
249
|
+
],
|
|
250
|
+
audio: { autoGainControl: true, noiseSuppression: true }
|
|
249
251
|
});
|
|
250
252
|
|
|
251
253
|
// Send messages during an active conversation
|
package/dist/client.d.ts
CHANGED
|
@@ -5,12 +5,14 @@ export type TelnyxAIAgentConstructorParams = {
|
|
|
5
5
|
agentId: string;
|
|
6
6
|
versionId?: string;
|
|
7
7
|
environment?: "production" | "development";
|
|
8
|
+
debug?: boolean;
|
|
8
9
|
};
|
|
9
10
|
export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
|
|
10
11
|
private telnyxRTC;
|
|
11
12
|
private transcription;
|
|
12
13
|
agentId: string;
|
|
13
14
|
versionId: string;
|
|
15
|
+
debug: boolean;
|
|
14
16
|
private audioStreamMonitor;
|
|
15
17
|
activeCall: Call | null;
|
|
16
18
|
constructor(params: TelnyxAIAgentConstructorParams);
|
|
@@ -68,6 +70,7 @@ export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
|
|
|
68
70
|
* ]
|
|
69
71
|
* });
|
|
70
72
|
* // These headers will be available in your AI assistant as {{user_name}} and {{agent_session}}
|
|
73
|
+
* @param options.audio - Audio constraints for the call (boolean or MediaTrackConstraints)
|
|
71
74
|
*/
|
|
72
75
|
startConversation(options?: {
|
|
73
76
|
destinationNumber?: string;
|
|
@@ -77,6 +80,7 @@ export declare class TelnyxAIAgent extends EventEmitter<AIAgentEvents> {
|
|
|
77
80
|
name: string;
|
|
78
81
|
value: string;
|
|
79
82
|
}[];
|
|
83
|
+
audio?: boolean | MediaTrackConstraints;
|
|
80
84
|
}): Promise<void>;
|
|
81
85
|
/**
|
|
82
86
|
* Ends the current active conversation with the AI agent.
|
package/dist/index.d.ts
CHANGED