@d-id/client-sdk 1.2.10 → 2.0.0-staging.376
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/dist/{index-B_3hteSX.js → index-C1LQdfy5.js} +522 -572
- package/dist/index.js +25 -28
- package/dist/index.umd.cjs +24 -24
- package/dist/{livekit-manager-Bpqug2PD.js → livekit-manager-BATxjlGi.js} +1 -1
- package/dist/src/api/agents.d.ts +2 -6
- package/dist/src/types/entities/agents/agent.d.ts +26 -55
- package/dist/src/utils/agent.d.ts +3 -4
- package/dist/src/utils/analytics.d.ts +1 -15
- package/package.json +1 -1
- package/dist/src/types/entities/agents/knowledge.d.ts +0 -12
- package/dist/src/types/entities/agents/llm.d.ts +0 -22
- package/dist/src/types/entities/agents/presenter.d.ts +0 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Ue, C as z, S as f, a as Oe, b as je, A as g, d as Ne, l as le, e as ze, t as Be, f as A, g as O, h as Je, i as Qe, j as R, n as We } from "./index-
|
|
1
|
+
import { c as Ue, C as z, S as f, a as Oe, b as je, A as g, d as Ne, l as le, e as ze, t as Be, f as A, g as O, h as Je, i as Qe, j as R, n as We } from "./index-C1LQdfy5.js";
|
|
2
2
|
function qe() {
|
|
3
3
|
try {
|
|
4
4
|
return Intl.DateTimeFormat().resolvedOptions().timeZone ?? "";
|
package/dist/src/api/agents.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { Agent,
|
|
1
|
+
import { Agent, Auth, Chat, ChatPayload, ChatResponse, RatingEntity, RatingPayload, STTTokenResponse, SubmitFeedbackResponse } from '../types/index';
|
|
2
2
|
import { RequestOptions } from './apiClient';
|
|
3
3
|
|
|
4
4
|
export declare function createAgentsApi(auth: Auth, host?: string, onError?: (error: Error, errorData: object) => void, externalId?: string): {
|
|
5
|
-
|
|
6
|
-
getAgents(tag?: string, options?: RequestOptions): Promise<Agent[]>;
|
|
7
|
-
getById(id: string, options?: RequestOptions): Promise<Agent>;
|
|
8
|
-
delete(id: string, options?: RequestOptions): Promise<any>;
|
|
9
|
-
update(id: string, payload: AgentPayload, options?: RequestOptions): Promise<Agent>;
|
|
5
|
+
getRuntimeById(id: string, options?: RequestOptions): Promise<Agent>;
|
|
10
6
|
newChat(agentId: string, payload: {
|
|
11
7
|
persist: boolean;
|
|
12
8
|
}, options?: RequestOptions): Promise<Chat>;
|
|
@@ -1,36 +1,5 @@
|
|
|
1
1
|
import { Chat, ChatPayload, ChatResponse } from './chat';
|
|
2
|
-
import { Knowledge } from './knowledge';
|
|
3
|
-
import { LLM } from './llm';
|
|
4
|
-
import { Presenter } from './presenter';
|
|
5
2
|
|
|
6
|
-
export declare enum UserPlan {
|
|
7
|
-
TRIAL = "trial",
|
|
8
|
-
BASIC = "basic",
|
|
9
|
-
ENTERPRISE = "enterprise",
|
|
10
|
-
LITE = "lite",
|
|
11
|
-
ADVANCED = "advanced"
|
|
12
|
-
}
|
|
13
|
-
export declare enum PlanGroup {
|
|
14
|
-
TRIAL = "deid-trial",
|
|
15
|
-
PRO = "deid-pro",
|
|
16
|
-
ENTERPRISE = "deid-enterprise",
|
|
17
|
-
LITE = "deid-lite",
|
|
18
|
-
ADVANCED = "deid-advanced",
|
|
19
|
-
BUILD = "deid-api-build",
|
|
20
|
-
LAUNCH = "deid-api-launch",
|
|
21
|
-
SCALE = "deid-api-scale"
|
|
22
|
-
}
|
|
23
|
-
export declare enum AgentStatus {
|
|
24
|
-
Created = "created",
|
|
25
|
-
Started = "started",
|
|
26
|
-
Done = "done",
|
|
27
|
-
Error = "error",
|
|
28
|
-
Rejected = "rejected",
|
|
29
|
-
Ready = "ready"
|
|
30
|
-
}
|
|
31
|
-
export interface Vision {
|
|
32
|
-
enabled: boolean;
|
|
33
|
-
}
|
|
34
3
|
export interface EndOfCallFeedbackConfig {
|
|
35
4
|
enabled: boolean;
|
|
36
5
|
closing_message?: string;
|
|
@@ -43,35 +12,37 @@ export interface EndOfCallFeedbackConfig {
|
|
|
43
12
|
}
|
|
44
13
|
export interface Agent {
|
|
45
14
|
id: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
vision?: Vision;
|
|
51
|
-
use_case?: string;
|
|
52
|
-
tags?: string[];
|
|
53
|
-
chats?: number;
|
|
15
|
+
owner_id?: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
access?: 'public';
|
|
18
|
+
thumbnail?: string;
|
|
54
19
|
greetings?: string[];
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
20
|
+
starter_message?: string[];
|
|
21
|
+
idle_video?: string;
|
|
22
|
+
knowledge?: {
|
|
23
|
+
id: string;
|
|
24
|
+
embedder?: {
|
|
25
|
+
is_limited_language?: boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
avatar: {
|
|
29
|
+
type: 'talk' | 'clip' | 'expressive';
|
|
30
|
+
voice?: {
|
|
31
|
+
language?: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
vision?: {
|
|
35
|
+
enabled: boolean;
|
|
58
36
|
};
|
|
59
|
-
preview_name?: string;
|
|
60
|
-
preview_description?: string;
|
|
61
|
-
preview_thumbnail?: string;
|
|
62
|
-
logo?: string;
|
|
63
|
-
preview_url?: string;
|
|
64
|
-
owner_id?: string;
|
|
65
|
-
status?: AgentStatus;
|
|
66
37
|
end_of_call_feedback?: EndOfCallFeedbackConfig;
|
|
38
|
+
triggers_available?: boolean;
|
|
39
|
+
advanced_settings?: {
|
|
40
|
+
ui_debug_mode?: boolean;
|
|
41
|
+
vm_account_id?: string;
|
|
42
|
+
};
|
|
67
43
|
}
|
|
68
|
-
export type AgentPayload = Omit<Agent, 'type' | 'created_at' | 'modified_at' | 'id' | 'owner_id' | 'metadata' | 'idle_video_url'>;
|
|
69
44
|
export interface AgentsAPI {
|
|
70
|
-
|
|
71
|
-
getAgents(tag?: string, options?: RequestInit): Promise<Agent[]>;
|
|
72
|
-
getById(id: string, options?: RequestInit): Promise<Agent>;
|
|
73
|
-
delete(id: string, options?: RequestInit): Promise<void>;
|
|
74
|
-
update(id: string, payload: AgentPayload, options?: RequestInit): Promise<Agent>;
|
|
45
|
+
getRuntimeById(id: string, options?: RequestInit): Promise<Agent>;
|
|
75
46
|
newChat(agentId: string, payload: {
|
|
76
47
|
persist: boolean;
|
|
77
48
|
}, options?: RequestInit): Promise<Chat>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Agent } from '../types';
|
|
2
2
|
|
|
3
|
-
type AgentType = 'clip_v2' | Agent['
|
|
3
|
+
type AgentType = 'clip_v2' | Agent['avatar']['type'];
|
|
4
4
|
export type PresenterType = 'v4' | 'v3-pro' | 'v2';
|
|
5
|
-
export declare const getAgentType: (presenter: Agent["
|
|
6
|
-
export declare const getPresenterType: (presenter: Agent["
|
|
7
|
-
export declare const getPresenterIdentifier: (presenter: Agent["presenter"]) => string;
|
|
5
|
+
export declare const getAgentType: (presenter: Agent["avatar"]) => AgentType;
|
|
6
|
+
export declare const getPresenterType: (presenter: Agent["avatar"]) => PresenterType;
|
|
8
7
|
export declare const isStreamsV2Agent: (type: AgentType) => boolean;
|
|
9
8
|
export {};
|
|
@@ -7,29 +7,15 @@ export declare function getAnalyticsInfo(agent: Agent): {
|
|
|
7
7
|
origin: string;
|
|
8
8
|
agentType: "talk" | "clip" | "expressive" | "clip_v2";
|
|
9
9
|
agentVoice: {
|
|
10
|
-
|
|
11
|
-
provider: import('../types/index').Providers | undefined;
|
|
10
|
+
language: string | undefined;
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
export declare function getAgentInfo(agent: Agent): {
|
|
15
|
-
from?: string | undefined;
|
|
16
14
|
agentType: "talk" | "clip" | "expressive" | "clip_v2";
|
|
17
15
|
presenterType: import('./agent').PresenterType;
|
|
18
|
-
presenter: string;
|
|
19
16
|
owner_id: string;
|
|
20
|
-
promptVersion: "v1" | "v2" | null | undefined;
|
|
21
|
-
behavior: {
|
|
22
|
-
role: string | undefined;
|
|
23
|
-
personality: string | undefined;
|
|
24
|
-
instructions: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
temperature: number | undefined;
|
|
27
|
-
knowledgeSource: "base_knowledge" | "documents" | null | undefined;
|
|
28
17
|
starterQuestionsCount: number | undefined;
|
|
29
|
-
topicsToAvoid: string[] | undefined;
|
|
30
|
-
maxResponseLength: number | undefined;
|
|
31
18
|
agentId: string;
|
|
32
|
-
access: "public" | "private" | "rejected" | "pending-public" | "unlisted" | undefined;
|
|
33
19
|
agentName: string | undefined;
|
|
34
20
|
};
|
|
35
21
|
export declare const getErrorMessage: (error: unknown) => string;
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type KnowledgeProvider = 'pinecone' | 'redis';
|
|
2
|
-
export interface KnowledgeEmbedder {
|
|
3
|
-
provider: string;
|
|
4
|
-
model: string;
|
|
5
|
-
is_limited_language?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface Knowledge {
|
|
8
|
-
id: string;
|
|
9
|
-
provider: KnowledgeProvider;
|
|
10
|
-
starter_message?: string[];
|
|
11
|
-
embedder?: KnowledgeEmbedder;
|
|
12
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type LLMProvider = 'openai' | 'custom';
|
|
2
|
-
export type AgentTemplate = 'rag-grounded' | 'rag-ungrounded' | 'assistant';
|
|
3
|
-
export interface PromptCustomization {
|
|
4
|
-
role?: string;
|
|
5
|
-
personality?: string;
|
|
6
|
-
topics_to_avoid?: string[];
|
|
7
|
-
max_response_length?: number;
|
|
8
|
-
knowledge_source?: 'base_knowledge' | 'documents' | null;
|
|
9
|
-
}
|
|
10
|
-
export interface LLM {
|
|
11
|
-
provider: LLMProvider;
|
|
12
|
-
prompt_version?: 'v1' | 'v2' | null;
|
|
13
|
-
instructions?: string;
|
|
14
|
-
template?: AgentTemplate;
|
|
15
|
-
prompt_customization?: PromptCustomization;
|
|
16
|
-
temperature?: number;
|
|
17
|
-
custom?: {
|
|
18
|
-
api_key?: string;
|
|
19
|
-
url?: string;
|
|
20
|
-
streaming?: boolean;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ExtendedTextToSpeechProviders } from '../../voice/tts';
|
|
2
|
-
import { Rect } from '../../face-rect';
|
|
3
|
-
|
|
4
|
-
export type videoType = 'talk' | 'clip' | 'expressive';
|
|
5
|
-
export type Presenter = TalkPresenter | ClipPresenter | ExpresivePresenter;
|
|
6
|
-
export interface BasePresenter {
|
|
7
|
-
type: videoType;
|
|
8
|
-
voice?: ExtendedTextToSpeechProviders & {
|
|
9
|
-
language?: string;
|
|
10
|
-
};
|
|
11
|
-
idle_video?: string;
|
|
12
|
-
thumbnail?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface TalkPresenter extends BasePresenter {
|
|
15
|
-
type: 'talk';
|
|
16
|
-
source_url: string;
|
|
17
|
-
driver_url?: string;
|
|
18
|
-
stitch?: boolean;
|
|
19
|
-
face?: Rect;
|
|
20
|
-
}
|
|
21
|
-
export interface ClipPresenter extends BasePresenter {
|
|
22
|
-
type: 'clip';
|
|
23
|
-
driver_id: string;
|
|
24
|
-
background?: string;
|
|
25
|
-
presenter_id: string;
|
|
26
|
-
is_greenscreen?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface ExpresivePresenter extends BasePresenter {
|
|
29
|
-
type: 'expressive';
|
|
30
|
-
presenter_id: string;
|
|
31
|
-
}
|