@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 CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ![D-ID Agents SDK](https://create-images-results.d-id.com/api_docs/assets/agents_sdk_cover_v2.png)
8
8
 
9
- The D-ID Agents SDK embeds an agent you built in D-ID Studio — or a real-time streaming avatar — into a web application. It wraps the D-ID Agents and Streams APIs behind one object: create an `AgentManager` for an 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 handles the WebRTC or LiveKit session, the chat transcript and the reconnects.
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].content),
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) — video, text-only or speak-only, and what each one creates on the wire.
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 media](https://sdk.d-id.com/documents/Expressive_media.html) — microphone, camera, speech-to-text, interrupts and data-channel messages.
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