@d-id/client-sdk 3.0.0-staging.419 → 3.0.0-staging.421
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 +4 -4
- package/dist/{index-D-HEM_62.js → index-DGM79eYJ.js} +104 -100
- package/dist/index-DGM79eYJ.js.map +1 -0
- package/dist/index.d.ts +172 -199
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +5 -5
- package/dist/{livekit-manager-BY7TXE80.js → livekit-manager-BxRnZa2O.js} +2 -2
- package/dist/{livekit-manager-BY7TXE80.js.map → livekit-manager-BxRnZa2O.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-D-HEM_62.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
-
The D-ID Agents SDK embeds an agent you built in D-ID Studio
|
|
9
|
+
The D-ID Agents SDK embeds an agent you built in D-ID Studio or with the Agents API into a web application. Create an `AgentManager` for the agent, `connect()`, then `chat()` to have the agent answer with its own LLM or `speak()` to have it say exactly what you give it. The SDK opens the video session (WebRTC, or LiveKit for Expressive agents), keeps the chat transcript and retries a failed connection.
|
|
10
10
|
|
|
11
11
|
**Please note:** This SDK is designed for front-end development only. The creation of Agents and Knowledge bases should be handled through the [Agents API](https://docs.d-id.com/docs/agent-quickstart) or directly within the [D-ID Studio](https://studio.d-id.com/agents).
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ const agentManager = await sdk.createAgentManager('agt_fumf1234', {
|
|
|
30
30
|
auth: { type: 'key', clientKey: 'YOUR_CLIENT_KEY' },
|
|
31
31
|
callbacks: {
|
|
32
32
|
onSrcObjectReady: stream => (videoElement.srcObject = stream),
|
|
33
|
-
onNewMessage: messages => console.log(messages[messages.length - 1]
|
|
33
|
+
onNewMessage: messages => console.log(messages[messages.length - 1]?.content),
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
|
|
@@ -49,9 +49,9 @@ The full API reference — every method, callback, option and type, generated fr
|
|
|
49
49
|
The guides:
|
|
50
50
|
|
|
51
51
|
- [Getting started](https://sdk.d-id.com/documents/Getting_started.html) — credentials, the first connection, `chat()` and `speak()`, disconnecting.
|
|
52
|
-
- [Chat modes](https://sdk.d-id.com/documents/Chat_modes.html) —
|
|
52
|
+
- [Chat modes](https://sdk.d-id.com/documents/Chat_modes.html) — conversation, scripted speech or chat off, and what each one creates on the wire.
|
|
53
53
|
- [Client tools](https://sdk.d-id.com/documents/Client_tools.html) — running your own functions when the agent's LLM calls them.
|
|
54
|
-
- [Expressive
|
|
54
|
+
- [Expressive agents](https://sdk.d-id.com/documents/Expressive_agents.html) — microphone, camera, speech-to-text, interrupts and data-channel messages.
|
|
55
55
|
- [Handling errors](https://sdk.d-id.com/documents/Handling_errors.html) — which failures reject, which reach `onError`, and what to log.
|
|
56
56
|
- [Migration guide](https://sdk.d-id.com/documents/Migration_guide.html) — every breaking change from 2.x.
|
|
57
57
|
|