@layercode/js-sdk 2.1.7 → 2.2.0
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 +1 -1
- package/dist/layercode-js-sdk.esm.js +5 -1
- package/dist/layercode-js-sdk.esm.js.map +1 -1
- package/dist/layercode-js-sdk.min.js +5 -1
- package/dist/layercode-js-sdk.min.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interfaces.d.ts +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,4 +16,4 @@ Or you can use a script tag in your HTML:
|
|
|
16
16
|
|
|
17
17
|
## Usage
|
|
18
18
|
|
|
19
|
-
Read the docs: [https://docs.layercode.com/sdk-reference/
|
|
19
|
+
Read the docs: [https://docs.layercode.com/sdk-reference/vanilla-js-sdk](https://docs.layercode.com/sdk-reference/vanilla-js-sdk)
|
|
@@ -3614,7 +3614,7 @@ function arrayBufferToBase64(arrayBuffer) {
|
|
|
3614
3614
|
const NOOP = () => { };
|
|
3615
3615
|
const DEFAULT_WS_URL = 'wss://api.layercode.com/v1/agents/web/websocket';
|
|
3616
3616
|
// SDK version - updated when publishing
|
|
3617
|
-
const SDK_VERSION = '2.
|
|
3617
|
+
const SDK_VERSION = '2.2.0';
|
|
3618
3618
|
/**
|
|
3619
3619
|
* @class LayercodeClient
|
|
3620
3620
|
* @classdesc Core client for Layercode audio agent that manages audio recording, WebSocket communication, and speech processing.
|
|
@@ -3802,6 +3802,10 @@ class LayercodeClient {
|
|
|
3802
3802
|
this._wsSend({ type: 'trigger.turn.end', role: 'user' });
|
|
3803
3803
|
}
|
|
3804
3804
|
}
|
|
3805
|
+
async sendClientResponseText(text) {
|
|
3806
|
+
await this._clientInterruptAssistantReplay();
|
|
3807
|
+
this._wsSend({ type: 'client.response.text', content: text });
|
|
3808
|
+
}
|
|
3805
3809
|
/**
|
|
3806
3810
|
* Handles incoming WebSocket messages
|
|
3807
3811
|
* @param {MessageEvent} event - The WebSocket message event
|