@decartai/sdk 0.0.35 → 0.0.37

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.
@@ -17,7 +17,7 @@ declare const avatarOptionsSchema: z.ZodObject<{
17
17
  type AvatarOptions = z.infer<typeof avatarOptionsSchema>;
18
18
  declare const realTimeClientConnectOptionsSchema: z.ZodObject<{
19
19
  model: z.ZodObject<{
20
- name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
20
+ name: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"lucy_v2v_14b_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
21
21
  urlPath: z.ZodString;
22
22
  queueUrlPath: z.ZodOptional<z.ZodString>;
23
23
  fps: z.ZodNumber;
@@ -54,7 +54,7 @@ type RealTimeClient = {
54
54
  on: <K extends keyof Events>(event: K, listener: (data: Events[K]) => void) => void;
55
55
  off: <K extends keyof Events>(event: K, listener: (data: Events[K]) => void) => void;
56
56
  sessionId: string;
57
- setImage: (image: Blob | File | string) => Promise<void>;
57
+ setImage: (image: Blob | File | string | null) => Promise<void>;
58
58
  playAudio?: (audio: Blob | File | ArrayBuffer) => Promise<void>;
59
59
  };
60
60
  //#endregion
@@ -100,6 +100,7 @@ const createRealTimeClient = (opts) => {
100
100
  off: eventEmitter.off,
101
101
  sessionId,
102
102
  setImage: async (image) => {
103
+ if (image === null) return webrtcManager.setImage(null);
103
104
  let imageBase64;
104
105
  if (typeof image === "string") {
105
106
  let url = null;
@@ -132,6 +132,7 @@ var WebRTCConnection = class {
132
132
  /**
133
133
  * Send an image to the server (e.g., as a reference for inference).
134
134
  * Can be called after connection is established.
135
+ * Pass null to clear the reference image.
135
136
  */
136
137
  async setImageBase64(imageBase64) {
137
138
  return new Promise((resolve, reject) => {
@@ -1,10 +1,10 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  //#region src/shared/model.d.ts
4
- declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>;
4
+ declare const realtimeModels: z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"lucy_v2v_14b_rt">, z.ZodLiteral<"live_avatar">]>;
5
5
  declare const videoModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>;
6
6
  declare const imageModels: z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>;
7
- declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
7
+ declare const modelSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"mirage">, z.ZodLiteral<"mirage_v2">, z.ZodLiteral<"lucy_v2v_720p_rt">, z.ZodLiteral<"lucy_v2v_14b_rt">, z.ZodLiteral<"live_avatar">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-dev-i2v">, z.ZodLiteral<"lucy-fast-v2v">, z.ZodLiteral<"lucy-pro-t2v">, z.ZodLiteral<"lucy-pro-i2v">, z.ZodLiteral<"lucy-pro-v2v">, z.ZodLiteral<"lucy-pro-flf2v">, z.ZodLiteral<"lucy-motion">, z.ZodLiteral<"lucy-restyle-v2v">]>, z.ZodUnion<readonly [z.ZodLiteral<"lucy-pro-t2i">, z.ZodLiteral<"lucy-pro-i2i">]>]>;
8
8
  type Model = z.infer<typeof modelSchema>;
9
9
  type RealTimeModels = z.infer<typeof realtimeModels>;
10
10
  type VideoModels = z.infer<typeof videoModels>;
@@ -6,6 +6,7 @@ const realtimeModels = z.union([
6
6
  z.literal("mirage"),
7
7
  z.literal("mirage_v2"),
8
8
  z.literal("lucy_v2v_720p_rt"),
9
+ z.literal("lucy_v2v_14b_rt"),
9
10
  z.literal("live_avatar")
10
11
  ]);
11
12
  const videoModels = z.union([
@@ -173,6 +174,14 @@ const _models = {
173
174
  height: 704,
174
175
  inputSchema: z.object({})
175
176
  },
177
+ lucy_v2v_14b_rt: {
178
+ urlPath: "/v1/stream",
179
+ name: "lucy_v2v_14b_rt",
180
+ fps: 15,
181
+ width: 1280,
182
+ height: 704,
183
+ inputSchema: z.object({})
184
+ },
176
185
  live_avatar: {
177
186
  urlPath: "/v1/stream",
178
187
  name: "live_avatar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decartai/sdk",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "Decart's JavaScript SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",