@dataclouder/ngx-agent-cards 0.1.29 → 0.1.30
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/fesm2022/dataclouder-ngx-agent-cards.mjs +1205 -679
- package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -1
- package/lib/components/chat-container/chat-container.component.d.ts +3 -4
- package/lib/components/chat-container/chat-header/chat-header.component.d.ts +2 -0
- package/lib/components/{text-highlighter/text-highlighter.d.ts → chat-container/chat-messages-list/chat-message/chat-message-orchestrator/message-content-displayer/message-content-displayer.d.ts} +7 -16
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message-orchestrator/message-orchestrator.component.d.ts +16 -0
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts +1 -2
- package/lib/components/chat-container/chat-messages-list/chat-messages-list.component.d.ts +1 -3
- package/lib/components/conversation-info/conversation-inspector.d.ts +23 -0
- package/lib/components/dc-agent-card-details/dc-agent-card-details.component.d.ts +5 -4
- package/lib/components/dc-agent-form/agent-task-form/agent-task-form.component.d.ts +1 -3
- package/lib/components/dc-agent-form/dc-agent-card-form.component.d.ts +30 -4
- package/lib/components/dc-agent-form/dc-conversation-flow-form/dc-conversation-flow-form.component.d.ts +4 -3
- package/lib/components/dc-agent-form/dc-do-action-form/dc-do-action-form.component.d.ts +4 -0
- package/lib/components/dc-agent-form/dc-dynamic-criteria-form/dc-dynamic-criteria-form.component.d.ts +19 -0
- package/lib/components/dc-agent-form/form-group.service.d.ts +32 -2
- package/lib/components/dc-agent-form/form-group.utils.d.ts +26 -4
- package/lib/components/feedback-evaluation/feedback-evaluation.component.d.ts +15 -0
- package/lib/components/translate-dialog/translate-dialog.component.d.ts +2 -2
- package/lib/models/agent.models.d.ts +29 -33
- package/lib/models/conversation-enums.d.ts +0 -7
- package/lib/pipes/format-key.pipe.d.ts +7 -0
- package/lib/prompts/dynamic-criteria.prompts.d.ts +2 -0
- package/lib/prompts/evaluation-performance-prompt.d.ts +38 -0
- package/lib/services/chat-monitor.service.d.ts +9 -0
- package/lib/services/context-engine.service.d.ts +16 -0
- package/lib/services/conversation-info.service.d.ts +12 -0
- package/lib/services/conversation.service.d.ts +5 -11
- package/lib/services/dc-conversation-builder.service.d.ts +3 -3
- package/lib/services/dynamic-criteria.service.d.ts +13 -0
- package/lib/services/dynamic-flow-task.service.d.ts +16 -0
- package/lib/services/dynamic-flow.service.d.ts +1 -0
- package/lib/services/evaluation.service.d.ts +12 -6
- package/lib/services/global-tools.service.d.ts +7 -0
- package/lib/services/message-orchestration.service.d.ts +29 -0
- package/package.json +4 -1
- package/public-api.d.ts +5 -3
- package/lib/components/chat-container/chat-messages-list/message-orchestrator/message-orchestrator.component.d.ts +0 -29
- package/lib/services/agent-user-progress.service.d.ts +0 -17
- package/lib/services/content-extractor.tool.d.ts +0 -2
- /package/lib/components/{text-highlighter → chat-container/chat-messages-list/chat-message/chat-message-orchestrator/message-content-displayer}/extract-tags.d.ts +0 -0
|
@@ -5,15 +5,15 @@ import { EvaluationService } from '../../services/evaluation.service';
|
|
|
5
5
|
import { ChatEvent } from '../../models/agent.models';
|
|
6
6
|
import { ChatUserSettings } from '@dataclouder/ngx-core';
|
|
7
7
|
import { MessagesStateService } from '../../services/messages-state.service';
|
|
8
|
-
import { DynamicFlowService } from '../../services/dynamic-flow.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
11
|
-
private
|
|
10
|
+
private conversationInfoService;
|
|
12
11
|
private conversationService;
|
|
13
12
|
evaluationService: EvaluationService;
|
|
14
13
|
private userDataExchange;
|
|
15
14
|
messageStateService: MessagesStateService;
|
|
16
|
-
|
|
15
|
+
private dialogService;
|
|
16
|
+
private chatMonitorService;
|
|
17
17
|
private chatFooterComponent;
|
|
18
18
|
chatUserSettings: ChatUserSettings;
|
|
19
19
|
conversationSettings: IConversationSettings;
|
|
@@ -26,7 +26,6 @@ export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
26
26
|
readonly goalCompleted: import("@angular/core").OutputEmitterRef<void>;
|
|
27
27
|
messages: import("@angular/core").WritableSignal<ChatMessage[]>;
|
|
28
28
|
micSettings: MicSettings;
|
|
29
|
-
isInfoVisible: boolean;
|
|
30
29
|
isAdmin: boolean;
|
|
31
30
|
constructor();
|
|
32
31
|
ngOnInit(): Promise<void>;
|
|
@@ -4,6 +4,7 @@ export declare class ChatHeaderComponent {
|
|
|
4
4
|
readonly isAdmin: import("@angular/core").InputSignal<boolean>;
|
|
5
5
|
alternativeConversation: IAgentCard[];
|
|
6
6
|
agentCard: IAgentCard;
|
|
7
|
+
private evaluationService;
|
|
7
8
|
readonly restartConversationEvent: import("@angular/core").OutputEmitterRef<IAgentCard>;
|
|
8
9
|
readonly showInfoEvent: import("@angular/core").OutputEmitterRef<void>;
|
|
9
10
|
readonly settingsClickEvent: import("@angular/core").OutputEmitterRef<void>;
|
|
@@ -12,6 +13,7 @@ export declare class ChatHeaderComponent {
|
|
|
12
13
|
showInfo(): void;
|
|
13
14
|
settingsClick(): void;
|
|
14
15
|
complete(): void;
|
|
16
|
+
openFeedback(): void;
|
|
15
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatHeaderComponent, never>;
|
|
16
18
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChatHeaderComponent, "dc-chat-header", never, { "isAdmin": { "alias": "isAdmin"; "required": false; "isSignal": true; }; "alternativeConversation": { "alias": "alternativeConversation"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; }, { "restartConversationEvent": "restartConversationEvent"; "showInfoEvent": "showInfoEvent"; "settingsClickEvent": "settingsClickEvent"; "completeEvent": "completeEvent"; }, never, never, true, never>;
|
|
17
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import { MessageContent } from '
|
|
2
|
+
import { MessageContent } from '../../../../../../models/agent.models';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface IWordMetadata {
|
|
5
5
|
word: string;
|
|
@@ -7,7 +7,8 @@ export interface IWordMetadata {
|
|
|
7
7
|
isHighlighted?: boolean;
|
|
8
8
|
tag?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type AudioState = 'idle' | 'playing' | 'paused' | 'loading' | 'playable';
|
|
11
|
+
export declare class MessageContentDisplayer implements OnDestroy {
|
|
11
12
|
message: import("@angular/core").InputSignal<MessageContent>;
|
|
12
13
|
readonly playAudio: import("@angular/core").OutputEmitterRef<MessageContent>;
|
|
13
14
|
readonly audioCompleted: import("@angular/core").OutputEmitterRef<MessageContent>;
|
|
@@ -17,11 +18,10 @@ export declare class TextHighlighterComponent implements OnDestroy {
|
|
|
17
18
|
messageId: string;
|
|
18
19
|
}>;
|
|
19
20
|
wordWithMeta: import("@angular/core").WritableSignal<IWordMetadata[]>;
|
|
20
|
-
|
|
21
|
+
audioState: import("@angular/core").WritableSignal<AudioState>;
|
|
21
22
|
alreadyPlayed: boolean;
|
|
22
23
|
wordsWithMetaState: IWordMetadata[];
|
|
23
|
-
iconState: import("@angular/core").Signal<"
|
|
24
|
-
isLoading: import("@angular/core").Signal<boolean>;
|
|
24
|
+
iconState: import("@angular/core").Signal<"paused" | "idle" | "playing" | "loading" | "playable">;
|
|
25
25
|
shouldPlayAudio: import("@angular/core").Signal<boolean>;
|
|
26
26
|
messageText: import("@angular/core").Signal<string>;
|
|
27
27
|
classTag: import("@angular/core").Signal<string>;
|
|
@@ -36,23 +36,14 @@ export declare class TextHighlighterComponent implements OnDestroy {
|
|
|
36
36
|
private initializeAudio;
|
|
37
37
|
private subcribeToAudioSync;
|
|
38
38
|
private subscribeToEndAudio;
|
|
39
|
-
/**
|
|
40
|
-
* Clean up audio element and event listeners
|
|
41
|
-
*/
|
|
42
39
|
private cleanupAudio;
|
|
43
|
-
/**
|
|
44
|
-
* Play or pause the audio
|
|
45
|
-
*/
|
|
46
40
|
onPlayMessage(): void;
|
|
47
|
-
/**
|
|
48
|
-
* Initialize plain text words by splitting the message text
|
|
49
|
-
*/
|
|
50
41
|
private initializePlainTextWords;
|
|
51
42
|
onWordClick(wordData: {
|
|
52
43
|
word: string;
|
|
53
44
|
index: number;
|
|
54
45
|
} | IWordMetadata): void;
|
|
55
46
|
private startAudioPlayback;
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageContentDisplayer, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageContentDisplayer, "message-content-displayer", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; }, { "playAudio": "playAudio"; "audioCompleted": "audioCompleted"; "wordClicked": "wordClicked"; }, never, never, true, never>;
|
|
58
49
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ChatRole, MessageContent } from '../../../../../models/agent.models';
|
|
3
|
+
import { WordData } from '../../../../../services/popup.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ChatMessageOrchestratorComponent implements OnInit {
|
|
6
|
+
private orchestrationService;
|
|
7
|
+
messages: import("@angular/core").InputSignal<MessageContent[]>;
|
|
8
|
+
messageRole: import("@angular/core").InputSignal<ChatRole>;
|
|
9
|
+
audioCompleted: import("@angular/core").OutputEmitterRef<MessageContent>;
|
|
10
|
+
messagesSignal: import("@angular/core").Signal<MessageContent[]>;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
onAudioCompleted(message: MessageContent): void;
|
|
13
|
+
onWordClicked(wordData: WordData): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageOrchestratorComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageOrchestratorComponent, "dc-message-orchestrator", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "messageRole": { "alias": "messageRole"; "required": true; "isSignal": true; }; }, { "audioCompleted": "audioCompleted"; }, never, never, true, never>;
|
|
16
|
+
}
|
package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts
CHANGED
|
@@ -7,11 +7,10 @@ export declare class ChatMessageComponent {
|
|
|
7
7
|
audioMessage: import("@angular/core").WritableSignal<MessageContent>;
|
|
8
8
|
hasMultiMessages: import("@angular/core").Signal<boolean>;
|
|
9
9
|
multiMessages: import("@angular/core").Signal<MessageContent[]>;
|
|
10
|
-
messageTranslation: import("@angular/core").Signal<string>;
|
|
11
10
|
isUserMessage: import("@angular/core").Signal<boolean>;
|
|
12
11
|
isAssistantMessage: import("@angular/core").Signal<boolean>;
|
|
13
12
|
evaluationEmoji: import("@angular/core").Signal<string>;
|
|
14
|
-
|
|
13
|
+
constructor();
|
|
15
14
|
showEvaluation(): void;
|
|
16
15
|
printData(): void;
|
|
17
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { AfterViewInit } from '@angular/core';
|
|
2
1
|
import { ChatMessage } from '../../../models/agent.models';
|
|
3
2
|
import { ChatUserSettings } from '@dataclouder/ngx-core';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ChatMessagesListComponent
|
|
4
|
+
export declare class ChatMessagesListComponent {
|
|
6
5
|
readonly chatUserSettings: import("@angular/core").InputSignal<ChatUserSettings>;
|
|
7
6
|
inputMessages: import("@angular/core").InputSignal<ChatMessage[]>;
|
|
8
7
|
private conversationService;
|
|
@@ -12,7 +11,6 @@ export declare class ChatMessagesListComponent implements AfterViewInit {
|
|
|
12
11
|
isThinking: import("@angular/core").Signal<boolean>;
|
|
13
12
|
messages: import("@angular/core").Signal<ChatMessage[]>;
|
|
14
13
|
constructor();
|
|
15
|
-
ngAfterViewInit(): void;
|
|
16
14
|
scrollToBottom(): void;
|
|
17
15
|
trackByMessage(index: number, message: ChatMessage): string;
|
|
18
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessagesListComponent, never>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
2
|
+
import { EvaluationService } from '../../services/evaluation.service';
|
|
3
|
+
import { MessagesStateService } from '../../services/messages-state.service';
|
|
4
|
+
import { DynamicFlowService } from '../../services/dynamic-flow.service';
|
|
5
|
+
import { IAgentCard } from '../../models/agent.models';
|
|
6
|
+
import { ChatUserSettings } from '@dataclouder/ngx-core';
|
|
7
|
+
import { GlobalToolsService } from '../../services/global-tools.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class ConversationInspector {
|
|
10
|
+
evaluationService: EvaluationService;
|
|
11
|
+
messageStateService: MessagesStateService;
|
|
12
|
+
dynamicFlowService: DynamicFlowService;
|
|
13
|
+
globalToolsService: GlobalToolsService;
|
|
14
|
+
config: DynamicDialogConfig<any, any>;
|
|
15
|
+
agentCard: IAgentCard;
|
|
16
|
+
chatUserSettings: ChatUserSettings;
|
|
17
|
+
value: number;
|
|
18
|
+
constructor();
|
|
19
|
+
setScore(): void;
|
|
20
|
+
callAgent(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationInspector, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationInspector, "dc-conversation-info", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -4,15 +4,16 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class DcAgentCardDetailsComponent implements OnInit {
|
|
5
5
|
private agentCardService;
|
|
6
6
|
private route;
|
|
7
|
-
private cdr;
|
|
8
7
|
private toastService;
|
|
9
8
|
agentCardId: string;
|
|
10
|
-
readonly onStartConversation: import("@angular/core").OutputEmitterRef<
|
|
11
|
-
agentCard: IAgentCard
|
|
9
|
+
readonly onStartConversation: import("@angular/core").OutputEmitterRef<IAgentCard>;
|
|
10
|
+
agentCard: import("@angular/core").WritableSignal<IAgentCard>;
|
|
11
|
+
showInfoLayer: import("@angular/core").WritableSignal<boolean>;
|
|
12
|
+
mediaType: import("@angular/core").Signal<"image" | "video">;
|
|
13
|
+
mediaUrl: import("@angular/core").Signal<string>;
|
|
12
14
|
ngOnInit(): Promise<void>;
|
|
13
15
|
startConversation(): void;
|
|
14
16
|
toggleInfoLayer(): void;
|
|
15
|
-
showInfoLayer: boolean;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DcAgentCardDetailsComponent, never>;
|
|
17
18
|
static ɵcmp: i0.ɵɵComponentDeclaration<DcAgentCardDetailsComponent, "dc-agent-card-details", never, { "agentCardId": { "alias": "agentCardId"; "required": false; }; }, { "onStartConversation": "onStartConversation"; }, never, never, true, never>;
|
|
18
19
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
1
|
import { SimpleAgentTask } from '../../../models/agent.models';
|
|
3
2
|
import { EModelQuality } from '@dataclouder/ngx-core';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
@@ -12,11 +11,10 @@ export declare function createAgentTaskFormGroup(task?: SimpleAgentTask): import
|
|
|
12
11
|
provider: import("@angular/forms").FormControl<string>;
|
|
13
12
|
}>;
|
|
14
13
|
}>;
|
|
15
|
-
export declare class AgentTaskFormComponent
|
|
14
|
+
export declare class AgentTaskFormComponent {
|
|
16
15
|
private formGroupService;
|
|
17
16
|
formGroup: import("@dataclouder/ngx-agent-cards").SimpleAgentTaskFormGroup;
|
|
18
17
|
shortForm?: boolean;
|
|
19
|
-
ngOnInit(): void;
|
|
20
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<AgentTaskFormComponent, never>;
|
|
21
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<AgentTaskFormComponent, "agent-task-form", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "shortForm": { "alias": "shortForm"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
20
|
}
|
|
@@ -29,13 +29,39 @@ export declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IA
|
|
|
29
29
|
readonly onGoDetails: import("@angular/core").OutputEmitterRef<string>;
|
|
30
30
|
readonly onTranslate: import("@angular/core").OutputEmitterRef<any>;
|
|
31
31
|
private getSettings;
|
|
32
|
-
form: FormGroup
|
|
32
|
+
form: FormGroup<{
|
|
33
|
+
version: import("@angular/forms").FormControl<string>;
|
|
34
|
+
id: import("@angular/forms").FormControl<string>;
|
|
35
|
+
title: import("@angular/forms").FormControl<string>;
|
|
36
|
+
description: import("@angular/forms").FormControl<string>;
|
|
37
|
+
lang: import("@angular/forms").FormControl<string>;
|
|
38
|
+
characterCard: FormGroup<any>;
|
|
39
|
+
conversationSettings: FormGroup<{
|
|
40
|
+
textEngine: import("@angular/forms").FormControl<TextEngines>;
|
|
41
|
+
conversationType: import("@angular/forms").FormControl<ConversationType>;
|
|
42
|
+
autoStart: import("@angular/forms").FormControl<boolean>;
|
|
43
|
+
mainVoice: FormGroup<any>;
|
|
44
|
+
secondaryVoice: FormGroup<any>;
|
|
45
|
+
model: FormGroup<{
|
|
46
|
+
quality: import("@angular/forms").FormControl<import("@dataclouder/ngx-core").EModelQuality>;
|
|
47
|
+
modelName: import("@angular/forms").FormControl<string>;
|
|
48
|
+
provider: import("@angular/forms").FormControl<string>;
|
|
49
|
+
id: import("@angular/forms").FormControl<string>;
|
|
50
|
+
}>;
|
|
51
|
+
}>;
|
|
52
|
+
metaApp: FormGroup<any>;
|
|
53
|
+
accounts: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
54
|
+
conversationFlow: FormGroup<{
|
|
55
|
+
goal: import("@dataclouder/ngx-agent-cards").SimpleAgentTaskFormGroup;
|
|
56
|
+
triggerTasks: import("@dataclouder/ngx-agent-cards").TriggerTasksFormGroup;
|
|
57
|
+
challenges: FormArray<import("@dataclouder/ngx-agent-cards").DynamicCriteriaFormGroup>;
|
|
58
|
+
tools: FormArray<import("@dataclouder/ngx-agent-cards").DynamicCriteriaFormGroup>;
|
|
59
|
+
dynamicConditions: FormArray<import("@dataclouder/ngx-agent-cards").DynamicConditionFormGroup>;
|
|
60
|
+
}>;
|
|
61
|
+
}>;
|
|
33
62
|
constructor();
|
|
34
63
|
protected patchForm(agentCard: IAgentCard): void;
|
|
35
64
|
get conversationSettings(): FormGroup;
|
|
36
|
-
get characterCard(): FormGroup;
|
|
37
|
-
get conversationFlow(): FormGroup;
|
|
38
|
-
get accounts(): FormArray;
|
|
39
65
|
save(): Promise<IAgentCard | undefined>;
|
|
40
66
|
onImageSelected(file: File): Promise<void>;
|
|
41
67
|
checkPrompt(): void;
|
|
@@ -2,16 +2,17 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { ConversationEvents } from '../../../models/agent.models';
|
|
3
3
|
import { EDoActionType, SystemPromptType } from '../form-group.utils';
|
|
4
4
|
import { ConversationFlowFormGroup } from '../form-group.utils';
|
|
5
|
+
import { IDynamicCriteria } from '../../../models/agent.models';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class DCConversationFlowFormComponent implements OnInit {
|
|
7
8
|
private formGroupService;
|
|
8
9
|
entityWhatOptions: {
|
|
9
10
|
label: string;
|
|
10
|
-
value: import("@dataclouder/ngx-agent-cards").
|
|
11
|
+
value: import("@dataclouder/ngx-agent-cards").ConditionType;
|
|
11
12
|
}[];
|
|
12
13
|
entityWhenOptions: {
|
|
13
14
|
label: string;
|
|
14
|
-
value: import("@dataclouder/ngx-agent-cards").
|
|
15
|
+
value: import("@dataclouder/ngx-agent-cards").ConditionOperator;
|
|
15
16
|
}[];
|
|
16
17
|
doActionTypeOptions: {
|
|
17
18
|
label: string;
|
|
@@ -21,6 +22,7 @@ export declare class DCConversationFlowFormComponent implements OnInit {
|
|
|
21
22
|
label: string;
|
|
22
23
|
value: SystemPromptType;
|
|
23
24
|
}[];
|
|
25
|
+
validTools: IDynamicCriteria[];
|
|
24
26
|
formGroup: ConversationFlowFormGroup;
|
|
25
27
|
conversationEvents: typeof ConversationEvents;
|
|
26
28
|
objectKeys: {
|
|
@@ -29,7 +31,6 @@ export declare class DCConversationFlowFormComponent implements OnInit {
|
|
|
29
31
|
};
|
|
30
32
|
constructor();
|
|
31
33
|
ngOnInit(): void;
|
|
32
|
-
private formatEnumKey;
|
|
33
34
|
removeArrayItem(controlPath: string, index: number): void;
|
|
34
35
|
showData(): void;
|
|
35
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationFlowFormComponent, never>;
|
|
@@ -18,6 +18,10 @@ export declare class DcDoActionFormComponent {
|
|
|
18
18
|
label: string;
|
|
19
19
|
value: EDoActionType;
|
|
20
20
|
}[];
|
|
21
|
+
dynamicFlowTaskTypeOptions: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: import("@dataclouder/ngx-agent-cards").EDynamicFlowTaskType;
|
|
24
|
+
}[];
|
|
21
25
|
EDoActionType: typeof EDoActionType;
|
|
22
26
|
onRemoveItem(): void;
|
|
23
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<DcDoActionFormComponent, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormArray, FormControl, AbstractControl } from '@angular/forms';
|
|
2
|
+
import { DynamicCriteriaFormGroup } from '../form-group.utils';
|
|
3
|
+
import { IDynamicCriteria } from '../../../models/agent.models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DcDynamicCriteriaFormComponent {
|
|
6
|
+
private formGroupService;
|
|
7
|
+
formArray: FormArray<DynamicCriteriaFormGroup>;
|
|
8
|
+
title: string;
|
|
9
|
+
mode: 'select' | 'free-text';
|
|
10
|
+
availableItems: IDynamicCriteria[];
|
|
11
|
+
displayDialog: boolean;
|
|
12
|
+
openDialog(): void;
|
|
13
|
+
addItem(item?: IDynamicCriteria): void;
|
|
14
|
+
removeItem(index: number): void;
|
|
15
|
+
getItemFormGroup(index: number): DynamicCriteriaFormGroup;
|
|
16
|
+
getFormControl(control: AbstractControl | null | undefined): FormControl;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcDynamicCriteriaFormComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DcDynamicCriteriaFormComponent, "dc-dynamic-criteria-form", never, { "formArray": { "alias": "formArray"; "required": true; }; "title": { "alias": "title"; "required": true; }; "mode": { "alias": "mode"; "required": false; }; "availableItems": { "alias": "availableItems"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -2,11 +2,40 @@ import { FormGroup, FormArray, FormControl, AbstractControl } from '@angular/for
|
|
|
2
2
|
import { SimpleAgentTaskFormGroup, DynamicConditionFormGroup, TriggerTasksFormGroup, ConversationFlowFormGroup, DoActionFormGroup } from './form-group.utils';
|
|
3
3
|
import { ConversationType, TextEngines } from '../../models/conversation-enums';
|
|
4
4
|
import { IAIModel, EModelQuality } from '@dataclouder/ngx-core';
|
|
5
|
-
import { DoAction, IAgentCard, IDynamicCondition, SimpleAgentTask, VoiceTTS } from '../../models/agent.models';
|
|
5
|
+
import { DoAction, IAgentCard, IDynamicCondition, IDynamicCriteria, SimpleAgentTask, VoiceTTS } from '../../models/agent.models';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class FormGroupService {
|
|
8
8
|
private fb;
|
|
9
|
-
createAgentCardForm(): FormGroup
|
|
9
|
+
createAgentCardForm(): FormGroup<{
|
|
10
|
+
version: FormControl<string>;
|
|
11
|
+
id: FormControl<string>;
|
|
12
|
+
title: FormControl<string>;
|
|
13
|
+
description: FormControl<string>;
|
|
14
|
+
lang: FormControl<string>;
|
|
15
|
+
characterCard: FormGroup<any>;
|
|
16
|
+
conversationSettings: FormGroup<{
|
|
17
|
+
textEngine: FormControl<TextEngines>;
|
|
18
|
+
conversationType: FormControl<ConversationType>;
|
|
19
|
+
autoStart: FormControl<boolean>;
|
|
20
|
+
mainVoice: FormGroup<any>;
|
|
21
|
+
secondaryVoice: FormGroup<any>;
|
|
22
|
+
model: FormGroup<{
|
|
23
|
+
quality: FormControl<EModelQuality>;
|
|
24
|
+
modelName: FormControl<string>;
|
|
25
|
+
provider: FormControl<string>;
|
|
26
|
+
id: FormControl<string>;
|
|
27
|
+
}>;
|
|
28
|
+
}>;
|
|
29
|
+
metaApp: FormGroup<any>;
|
|
30
|
+
accounts: FormArray<FormControl<unknown>>;
|
|
31
|
+
conversationFlow: FormGroup<{
|
|
32
|
+
goal: SimpleAgentTaskFormGroup;
|
|
33
|
+
triggerTasks: TriggerTasksFormGroup;
|
|
34
|
+
challenges: FormArray<import("@dataclouder/ngx-agent-cards").DynamicCriteriaFormGroup>;
|
|
35
|
+
tools: FormArray<import("@dataclouder/ngx-agent-cards").DynamicCriteriaFormGroup>;
|
|
36
|
+
dynamicConditions: FormArray<DynamicConditionFormGroup>;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
10
39
|
patchFormWithConversationData(form: FormGroup, agentCard: IAgentCard): void;
|
|
11
40
|
handleArrayForms(form: FormGroup, agentCard: IAgentCard): void;
|
|
12
41
|
createCharacterCardFormGroup(): FormGroup;
|
|
@@ -37,6 +66,7 @@ export declare class FormGroupService {
|
|
|
37
66
|
createDoActionFormGroup(action?: DoAction): DoActionFormGroup;
|
|
38
67
|
createTriggerTasksFormGroup(): TriggerTasksFormGroup;
|
|
39
68
|
createSimpleAgentTaskFormGroup(task?: SimpleAgentTask): SimpleAgentTaskFormGroup;
|
|
69
|
+
createDynamicCriteriaFormGroup(criteria?: IDynamicCriteria): FormGroup;
|
|
40
70
|
removeArrayItem(formGroup: FormGroup, controlPath: string, index: number): void;
|
|
41
71
|
addArrayItem(formGroup: FormGroup, controlPath: string, itemFactory?: () => AbstractControl): void;
|
|
42
72
|
updateArrayField(formGroup: FormGroup, controlPath: string, index: number, event: Event): void;
|
|
@@ -9,15 +9,27 @@ export type ModelFormGroup = FormGroup<{
|
|
|
9
9
|
quality: FormControl<EModelQuality>;
|
|
10
10
|
}>;
|
|
11
11
|
export declare enum EDoActionType {
|
|
12
|
-
ChangePrompt = "changePrompt"
|
|
13
|
-
|
|
14
|
-
ChangeModel = "changeModel"
|
|
12
|
+
ChangePrompt = "changePrompt",// Este es context Prompt
|
|
13
|
+
ChangeDynamicFlowTask = "changeDynamicFlowTask",// Change AI Task since
|
|
14
|
+
ChangeModel = "changeModel",// Just a thought Not implemented yet
|
|
15
15
|
Summarize = "summarize"
|
|
16
16
|
}
|
|
17
17
|
export declare const DoActionTypeOptions: {
|
|
18
18
|
label: string;
|
|
19
19
|
value: EDoActionType;
|
|
20
20
|
}[];
|
|
21
|
+
export declare enum EDynamicFlowTaskType {
|
|
22
|
+
Goal = "goal",
|
|
23
|
+
Tools = "tools",
|
|
24
|
+
Challenges = "challenges",
|
|
25
|
+
OnUserMessage = "onUserMessage",
|
|
26
|
+
OnAssistantMessage = "onAssistantMessage",
|
|
27
|
+
OnGoalCompleted = "onGoalCompleted"
|
|
28
|
+
}
|
|
29
|
+
export declare const DynamicFlowTaskTypeOptions: {
|
|
30
|
+
label: string;
|
|
31
|
+
value: EDynamicFlowTaskType;
|
|
32
|
+
}[];
|
|
21
33
|
export declare enum SystemPromptType {
|
|
22
34
|
SystemPrompt = "systemPrompt",
|
|
23
35
|
Language = "language",
|
|
@@ -40,11 +52,20 @@ export type SimpleAgentTaskFormGroup = FormGroup<{
|
|
|
40
52
|
expectedResponseType: FormControl<string>;
|
|
41
53
|
modelQuality: FormControl<EModelQuality>;
|
|
42
54
|
model: ModelFormGroup;
|
|
55
|
+
enabled: FormControl<boolean>;
|
|
56
|
+
}>;
|
|
57
|
+
export type DynamicCriteriaFormGroup = FormGroup<{
|
|
58
|
+
name: FormControl<string>;
|
|
59
|
+
description: FormControl<string>;
|
|
60
|
+
enabled: FormControl<boolean>;
|
|
61
|
+
emoji: FormControl<string>;
|
|
43
62
|
}>;
|
|
44
63
|
export type DoActionFormGroup = FormGroup<{
|
|
45
64
|
actionType: FormControl<string>;
|
|
46
65
|
systemPromptType: FormControl<string>;
|
|
66
|
+
dynamicFlowTaskType: FormControl<string>;
|
|
47
67
|
prompt: FormControl<string>;
|
|
68
|
+
enabled: FormControl<boolean>;
|
|
48
69
|
}>;
|
|
49
70
|
export type DynamicConditionFormGroup = FormGroup<{
|
|
50
71
|
what: FormControl<string>;
|
|
@@ -61,7 +82,8 @@ export type TriggerTasksFormGroup = FormGroup<{
|
|
|
61
82
|
export type ConversationFlowFormGroup = FormGroup<{
|
|
62
83
|
goal: SimpleAgentTaskFormGroup;
|
|
63
84
|
triggerTasks: TriggerTasksFormGroup;
|
|
64
|
-
|
|
85
|
+
challenges: FormArray<DynamicCriteriaFormGroup>;
|
|
86
|
+
tools: FormArray<DynamicCriteriaFormGroup>;
|
|
65
87
|
dynamicConditions: FormArray<DynamicConditionFormGroup>;
|
|
66
88
|
}>;
|
|
67
89
|
export type ConversationSettingsFormGroup = FormGroup<{
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
|
|
3
|
+
import { PerformanceEvaluation } from '../../prompts/evaluation-performance-prompt';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class FeedbackEvaluationComponent implements OnInit {
|
|
6
|
+
ref: DynamicDialogRef<any>;
|
|
7
|
+
config: DynamicDialogConfig<any, any>;
|
|
8
|
+
evaluationData: PerformanceEvaluation;
|
|
9
|
+
constructor();
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
private getDummyEvaluationData;
|
|
12
|
+
closeDialog(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FeedbackEvaluationComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FeedbackEvaluationComponent, "dc-feedback-evaluation", never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -8,8 +8,8 @@ export declare class TranslateDialogComponent {
|
|
|
8
8
|
};
|
|
9
9
|
form: FormGroup;
|
|
10
10
|
languages: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
13
|
}[];
|
|
14
14
|
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
15
15
|
constructor(...args: unknown[]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CloudStorageData, IAssetable, ImgStorageData } from '@dataclouder/ngx-cloud-storage';
|
|
2
2
|
import { AudioSpeed, ConversationType, TextEngines } from './conversation-enums';
|
|
3
3
|
import { IAIModel, EModelQuality } from '@dataclouder/ngx-core';
|
|
4
|
-
import { EDoActionType, SystemPromptType } from '../components/dc-agent-form/form-group.utils';
|
|
4
|
+
import { EDoActionType, EDynamicFlowTaskType, SystemPromptType } from '../components/dc-agent-form/form-group.utils';
|
|
5
5
|
import { AudioEffectType } from '@dataclouder/ngx-vertex';
|
|
6
6
|
export interface Appearance {
|
|
7
7
|
generalDescription: string;
|
|
@@ -84,17 +84,17 @@ export interface IAgentAssets {
|
|
|
84
84
|
bannerImg?: ImgStorageData;
|
|
85
85
|
stickers?: Array<ImgStorageData>;
|
|
86
86
|
}
|
|
87
|
-
export declare enum
|
|
87
|
+
export declare enum ConditionType {
|
|
88
88
|
Goal = "goal",
|
|
89
|
-
|
|
89
|
+
Challenges = "challenges",
|
|
90
90
|
NumMessages = "numMessages",
|
|
91
91
|
Time = "time"
|
|
92
92
|
}
|
|
93
93
|
export declare const EntityWhatOptions: {
|
|
94
94
|
label: string;
|
|
95
|
-
value:
|
|
95
|
+
value: ConditionType;
|
|
96
96
|
}[];
|
|
97
|
-
export declare enum
|
|
97
|
+
export declare enum ConditionOperator {
|
|
98
98
|
LowerThan = "<",
|
|
99
99
|
LowerThanOrEqual = "<=",
|
|
100
100
|
Equal = "=",
|
|
@@ -103,28 +103,35 @@ export declare enum EntityWhen {
|
|
|
103
103
|
}
|
|
104
104
|
export declare const EntityWhenOptions: {
|
|
105
105
|
label: string;
|
|
106
|
-
value:
|
|
106
|
+
value: ConditionOperator;
|
|
107
107
|
}[];
|
|
108
108
|
export declare enum EntityThen {
|
|
109
109
|
ChangePrompt = "changePrompt"
|
|
110
110
|
}
|
|
111
111
|
export type DoAction = {
|
|
112
112
|
actionType: EDoActionType;
|
|
113
|
-
systemPromptType
|
|
114
|
-
|
|
113
|
+
systemPromptType?: SystemPromptType;
|
|
114
|
+
dynamicFlowTaskType?: EDynamicFlowTaskType;
|
|
115
|
+
prompt?: string;
|
|
116
|
+
enabled?: boolean;
|
|
115
117
|
};
|
|
116
118
|
export interface IDynamicCondition {
|
|
117
|
-
what:
|
|
118
|
-
when:
|
|
119
|
+
what: ConditionType;
|
|
120
|
+
when: ConditionOperator;
|
|
119
121
|
value: string | number;
|
|
120
|
-
then: EntityThen;
|
|
121
|
-
task: SimpleAgentTask;
|
|
122
122
|
do?: DoAction[];
|
|
123
123
|
}
|
|
124
|
+
export interface IDynamicCriteria {
|
|
125
|
+
enabled: boolean;
|
|
126
|
+
name: string;
|
|
127
|
+
description: string;
|
|
128
|
+
emoji?: string;
|
|
129
|
+
}
|
|
124
130
|
export interface IConversationFlow {
|
|
125
|
-
goal:
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
goal: IDynamicFlowTask;
|
|
132
|
+
tools?: IDynamicCriteria[];
|
|
133
|
+
triggerTasks: Partial<Record<ConversationEvents, IDynamicFlowTask>>;
|
|
134
|
+
challenges?: IDynamicCriteria[];
|
|
128
135
|
dynamicConditions: IDynamicCondition[];
|
|
129
136
|
}
|
|
130
137
|
export interface IAgentCard {
|
|
@@ -150,33 +157,19 @@ export interface SimpleEvalResult {
|
|
|
150
157
|
score: number;
|
|
151
158
|
feedback: string;
|
|
152
159
|
}
|
|
153
|
-
export interface LanguageEvaluation {
|
|
154
|
-
score: number;
|
|
155
|
-
grammarFix: string;
|
|
156
|
-
lexicalFix: string;
|
|
157
|
-
sentenceFix: string;
|
|
158
|
-
}
|
|
159
160
|
export interface ISimpleAgent {
|
|
160
161
|
systemPrompt: string;
|
|
161
162
|
model: IAIModel;
|
|
162
163
|
}
|
|
163
|
-
export interface ISimpleTask {
|
|
164
|
-
task: string;
|
|
165
|
-
expectedResponseType?: string;
|
|
166
|
-
sources?: string[];
|
|
167
|
-
}
|
|
168
164
|
export interface SimpleAgentTask {
|
|
169
165
|
task: string;
|
|
170
166
|
modelQuality?: EModelQuality;
|
|
171
167
|
expectedResponseType?: string;
|
|
172
168
|
systemPrompt?: string;
|
|
173
169
|
model?: IAIModel;
|
|
170
|
+
enabled?: boolean;
|
|
174
171
|
}
|
|
175
|
-
export type
|
|
176
|
-
export interface AppAgentTask {
|
|
177
|
-
agent: ISimpleAgent;
|
|
178
|
-
task: ISimpleTask;
|
|
179
|
-
}
|
|
172
|
+
export type IDynamicFlowTask = Pick<SimpleAgentTask, 'task' | 'model' | 'enabled'>;
|
|
180
173
|
export declare enum EAccountsPlatform {
|
|
181
174
|
Tiktok = "tiktok",
|
|
182
175
|
Instagram = "instagram",
|
|
@@ -233,6 +226,7 @@ export declare class ChatMessage extends MessageContent {
|
|
|
233
226
|
stats?: any;
|
|
234
227
|
multiMessages?: MessageContent[];
|
|
235
228
|
evaluation?: Record<string, any>;
|
|
229
|
+
tags?: string[];
|
|
236
230
|
}
|
|
237
231
|
export declare class ConversationMessagesDTO {
|
|
238
232
|
messages?: ChatMessage[];
|
|
@@ -289,8 +283,10 @@ export declare enum ContextType {
|
|
|
289
283
|
CurrentMessageContent = "MessageContent",
|
|
290
284
|
LastAssistantMessage = "LastAssistantMessage",
|
|
291
285
|
LastUserMessage = "LastUserMessage",
|
|
292
|
-
|
|
293
|
-
|
|
286
|
+
LastMessage = "LastMessage",// Last User + Last Assistant
|
|
287
|
+
Last2Messages = "Last2Messages",
|
|
288
|
+
Last3Messages = "Last3Messages",
|
|
289
|
+
Last4Messages = "Last4Messages",
|
|
294
290
|
LastUserAndPreviousAssistant = "LastUserAndPreviousAssistant",
|
|
295
291
|
AllConversation = "AllConversation"
|
|
296
292
|
}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import { ChatUserSettings } from '@dataclouder/ngx-core';
|
|
2
|
-
export declare const LangCodeDescriptionEs: {
|
|
3
|
-
es: string;
|
|
4
|
-
en: string;
|
|
5
|
-
it: string;
|
|
6
|
-
pt: string;
|
|
7
|
-
fr: string;
|
|
8
|
-
};
|
|
9
2
|
export declare const defaultconvUserSettings: ChatUserSettings;
|
|
10
3
|
export declare class VoiceTTSOption {
|
|
11
4
|
provider: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FormatKeyPipe implements PipeTransform {
|
|
4
|
+
transform(value: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatKeyPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatKeyPipe, "formatKey", true>;
|
|
7
|
+
}
|