@dataclouder/ngx-agent-cards 0.0.84 → 0.0.86
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 +1515 -578
- package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -1
- package/lib/components/audio-text-sync/audio-text-sync.component.d.ts +42 -0
- package/lib/components/chat/chat.models.d.ts +2 -0
- package/lib/components/chat/dc-chat.component.d.ts +5 -7
- package/lib/components/chat-container/chat-container.component.d.ts +66 -0
- package/lib/components/chat-container/chat-footer/chat-footer.component.d.ts +30 -0
- package/lib/components/chat-container/chat-header/chat-header.component.d.ts +20 -0
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts +30 -0
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.utils.d.ts +3 -0
- package/lib/components/chat-container/chat-messages-list/chat-message/message-content/message-content.component.d.ts +24 -0
- package/lib/components/chat-container/chat-messages-list/chat-message/multi-message-content/multi-message-content.d.ts +22 -0
- package/lib/components/chat-container/chat-messages-list/chat-messages-list.component.d.ts +13 -0
- package/lib/components/dc-agent-card-details/dc-agent-card-details.component.d.ts +8 -4
- package/lib/components/dc-agent-card-lists/agent-card-default-ui/agent-card-default-ui.component.d.ts +2 -1
- package/lib/components/dc-agent-card-lists/dc-agent-card-lists.component.d.ts +3 -5
- package/lib/components/dc-agent-form/dc-agent-card-form.component.d.ts +12 -8
- package/lib/components/icons/icon-map.d.ts +0 -3
- package/lib/models/agent.models.d.ts +11 -15
- package/lib/models/conversation-enums.d.ts +2 -0
- package/lib/pipes/parse-card.pipe.d.ts +10 -0
- package/lib/services/audio-text-sync.service.d.ts +57 -0
- package/lib/services/conversation.service.d.ts +31 -0
- package/lib/services/dc-conversation-builder.service.d.ts +6 -1
- package/lib/services/evaluation.service.d.ts +17 -0
- package/lib/services/message-processing.service.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
- package/lib/components/chat-message/chat-message.component.d.ts +0 -28
|
@@ -11,9 +11,14 @@ export declare class DCConversationPromptBuilderService {
|
|
|
11
11
|
[key: string]: string;
|
|
12
12
|
}): ChatMessage[];
|
|
13
13
|
private getDefaultParseDict;
|
|
14
|
+
getDefaultCardParseDict(card: IAgentCard): {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
14
17
|
convertConversationToHtml(messages: ChatMessage[], jailBrake?: string): string;
|
|
15
18
|
private parseConversation;
|
|
16
|
-
|
|
19
|
+
applyReplacements(text: string, replacements: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
}): string;
|
|
17
22
|
private getDefaultPromptByType;
|
|
18
23
|
private buildInitialConversation;
|
|
19
24
|
private selectOneRandomGreeting;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import { ChatMessage, IMiniAgentCard } from '../models/agent.models';
|
|
3
|
+
import { AgentCardsAbstractService } from '../models/conversation-ai.class';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class EvaluationService {
|
|
6
|
+
private agentCardService;
|
|
7
|
+
private scoreSignal;
|
|
8
|
+
private evaluationResultSignal;
|
|
9
|
+
constructor(agentCardService: AgentCardsAbstractService);
|
|
10
|
+
getScore(): Signal<number>;
|
|
11
|
+
getEvaluationResult(): Signal<any>;
|
|
12
|
+
evaluateConversation(messages: ChatMessage[], evaluator: IMiniAgentCard): Promise<void>;
|
|
13
|
+
private updateScore;
|
|
14
|
+
resetScore(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EvaluationService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EvaluationService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatMessage, IAgentResponseDTO, IConversationSettings } from '../models/agent.models';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class MessageProcessingService {
|
|
4
|
+
constructor();
|
|
5
|
+
processMessage(message: IAgentResponseDTO | ChatMessage, conversationSettings: IConversationSettings, mutate?: boolean): ChatMessage;
|
|
6
|
+
private processMultiMessages;
|
|
7
|
+
subsItalicsByTag(text: string, voiceId?: string, tagName?: string): string;
|
|
8
|
+
getVoice(voice_value: string, targetLang?: string): string;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageProcessingService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageProcessingService>;
|
|
11
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from './lib/models/conversation-ai.class';
|
|
|
3
3
|
export * from './lib/models/conversation-enums';
|
|
4
4
|
export * from './lib/services/audio.service';
|
|
5
5
|
export * from './lib/services/dc-conversation-builder.service';
|
|
6
|
-
export * from './lib/components/chat-
|
|
6
|
+
export * from './lib/components/chat-container/chat-container.component';
|
|
7
7
|
export * from './lib/components/chat/dc-chat.component';
|
|
8
8
|
export * from './lib/components/dc-agent-form/dc-agent-card-form.component';
|
|
9
9
|
export * from './lib/components/dc-agent-card-lists/dc-agent-card-lists.component';
|
|
@@ -13,3 +13,4 @@ export * from './lib/models/user-data-exchange';
|
|
|
13
13
|
export * from './lib/components/dc-agent-card-lists/dc-agent-card-lists.component';
|
|
14
14
|
export * from './lib/components/provider-selector/provider-selector.component';
|
|
15
15
|
export * from './lib/models/agent.utils';
|
|
16
|
+
export * from './lib/components/chat-container/chat-container.component';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { ChatMessage, ChatMultiMessage, ChatUserSettings } from '../../models/agent.models';
|
|
3
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
4
|
-
import { AudioService } from '../../services/audio.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ChatMessageComponent implements OnInit, OnDestroy {
|
|
7
|
-
private audioService;
|
|
8
|
-
private agentCardService;
|
|
9
|
-
private cdr;
|
|
10
|
-
chatMessage: ChatMessage;
|
|
11
|
-
chatUserSettings: ChatUserSettings;
|
|
12
|
-
isDestroyed: boolean;
|
|
13
|
-
message: ChatMessage | ChatMultiMessage;
|
|
14
|
-
conversationChatSettings: any;
|
|
15
|
-
private defaultconvUserSettings;
|
|
16
|
-
constructor(audioService: AudioService, agentCardService: AgentCardsAbstractService, cdr: ChangeDetectorRef);
|
|
17
|
-
ngOnInit(): Promise<void>;
|
|
18
|
-
ngOnDestroy(): void;
|
|
19
|
-
generateAndPlayAudio(message: ChatMessage, overwritetext?: any): Promise<void>;
|
|
20
|
-
private extractAudioAndTranscription;
|
|
21
|
-
playMessage(message: ChatMessage | ChatMultiMessage): HTMLAudioElement;
|
|
22
|
-
subscribeToTimeUpdate(audioHtml: any, transcriptionTimestamps?: any): void;
|
|
23
|
-
generateAndPlayAllAudios(multiMessages: ChatMultiMessage[]): void;
|
|
24
|
-
private getTTSRequest;
|
|
25
|
-
private matchTranscription;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "dc-chat-message", never, { "chatMessage": { "alias": "chatMessage"; "required": false; }; "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
-
}
|