@dataclouder/ngx-agent-cards 0.0.89 → 0.1.0
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 +87 -55
- package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -1
- package/lib/components/chat-container/chat-container.component.d.ts +3 -2
- package/lib/components/chat-container/chat-footer/chat-footer.component.d.ts +4 -2
- package/lib/components/chat-container/chat-messages-list/chat-messages-list.component.d.ts +6 -1
- package/lib/components/chat-settings/dc-conversation-userchat-settings.component.d.ts +2 -3
- package/lib/models/agent.models.d.ts +1 -0
- package/lib/models/conversation-ai.class.d.ts +2 -2
- package/lib/services/conversation.service.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
3
|
-
import { ChatMessage, ChatUserSettings, IAgentCard, IMiniAgentCard } from '../../models/agent.models';
|
|
3
|
+
import { ChatMessage, ChatUserSettings, IAgentCard, IConversationSettings, IMiniAgentCard } from '../../models/agent.models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
6
6
|
private conversationBuilder;
|
|
@@ -8,6 +8,7 @@ export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
8
8
|
private conversationService;
|
|
9
9
|
private userDataExchange;
|
|
10
10
|
chatUserSettings: ChatUserSettings;
|
|
11
|
+
conversationSettings: IConversationSettings;
|
|
11
12
|
agentCard: IAgentCard;
|
|
12
13
|
readonly evaluatorAgentCard: import("@angular/core").InputSignal<IMiniAgentCard>;
|
|
13
14
|
readonly parseDict: import("@angular/core").InputSignal<{
|
|
@@ -33,5 +34,5 @@ export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
33
34
|
*/
|
|
34
35
|
restartConversation(conversation?: IAgentCard | null): Promise<void>;
|
|
35
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCChatComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; "isSignal": true; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "conversationSettings": { "alias": "conversationSettings"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; "isSignal": true; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
37
38
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { FormControl } from '@angular/forms';
|
|
2
|
-
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
2
|
+
import { MicSettings, AudioRecording } from '@dataclouder/ngx-mic';
|
|
3
3
|
import { ChatMessage, IMiniAgentCard } from '../../../models/agent.models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ChatFooterComponent {
|
|
6
6
|
private conversationService;
|
|
7
7
|
private evaluationService;
|
|
8
|
+
private agentCardService;
|
|
8
9
|
readonly isAIThinking: import("@angular/core").InputSignal<boolean>;
|
|
9
10
|
readonly evaluatorAgentCard: import("@angular/core").InputSignal<IMiniAgentCard>;
|
|
10
11
|
readonly micSettings: import("@angular/core").InputSignal<MicSettings>;
|
|
@@ -32,7 +33,8 @@ export declare class ChatFooterComponent {
|
|
|
32
33
|
* Evaluate conversation using evaluator agent
|
|
33
34
|
*/
|
|
34
35
|
private evaluateConversation;
|
|
35
|
-
|
|
36
|
+
handleAudioRecorded(event: AudioRecording): void;
|
|
37
|
+
onMicFinished(eventBlob: Blob | any): Promise<void>;
|
|
36
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatFooterComponent, never>;
|
|
37
39
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChatFooterComponent, "dc-chat-footer", never, { "isAIThinking": { "alias": "isAIThinking"; "required": false; "isSignal": true; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; "isSignal": true; }; "micSettings": { "alias": "micSettings"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; "textInputChanged": "textInputChanged"; }, never, never, true, never>;
|
|
38
40
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
|
1
2
|
import { ChatMessage, ChatUserSettings } from '../../../models/agent.models';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ChatMessagesListComponent {
|
|
4
|
+
export declare class ChatMessagesListComponent implements AfterViewInit {
|
|
4
5
|
readonly chatUserSettings: import("@angular/core").InputSignal<ChatUserSettings>;
|
|
5
6
|
aiIcon: string;
|
|
6
7
|
private conversationService;
|
|
7
8
|
inputMessages: import("@angular/core").InputSignal<ChatMessage[]>;
|
|
9
|
+
private elementRef;
|
|
8
10
|
messages: import("@angular/core").Signal<ChatMessage[]>;
|
|
9
11
|
isThinking: import("@angular/core").Signal<boolean>;
|
|
12
|
+
constructor();
|
|
13
|
+
ngAfterViewInit(): void;
|
|
14
|
+
scrollToBottom(): void;
|
|
10
15
|
trackByMessage(index: number, message: ChatMessage): string;
|
|
11
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessagesListComponent, never>;
|
|
12
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessagesListComponent, "dc-chat-messages-list", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": true; "isSignal": true; }; "inputMessages": { "alias": "inputMessages"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
2
|
import { TextEngines } from '../../models/conversation-enums';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
@@ -16,7 +15,7 @@ export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
|
16
15
|
label: string;
|
|
17
16
|
}[];
|
|
18
17
|
modelnames: any[];
|
|
19
|
-
form: FormGroup<{
|
|
18
|
+
form: import("@angular/forms").FormGroup<{
|
|
20
19
|
synthVoice: import("@angular/forms").FormControl<boolean>;
|
|
21
20
|
highlightWords: import("@angular/forms").FormControl<boolean>;
|
|
22
21
|
speed: import("@angular/forms").FormControl<number>;
|
|
@@ -26,7 +25,7 @@ export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
|
26
25
|
fixGrammar: import("@angular/forms").FormControl<boolean>;
|
|
27
26
|
autoTranslate: import("@angular/forms").FormControl<boolean>;
|
|
28
27
|
voice: import("@angular/forms").FormControl<string>;
|
|
29
|
-
model: FormGroup<{
|
|
28
|
+
model: import("@angular/forms").FormGroup<{
|
|
30
29
|
provider: import("@angular/forms").FormControl<string>;
|
|
31
30
|
modelName: import("@angular/forms").FormControl<string>;
|
|
32
31
|
id: import("@angular/forms").FormControl<string>;
|
|
@@ -51,6 +51,7 @@ export interface IConversationSettings {
|
|
|
51
51
|
voice?: string;
|
|
52
52
|
secondaryVoice?: string;
|
|
53
53
|
repeatRecording?: boolean;
|
|
54
|
+
model?: IAIModel;
|
|
54
55
|
}
|
|
55
56
|
export type IConversationSettingsDTO = Pick<IConversationSettings, 'messages' | 'textEngine' | 'conversationType'> & {
|
|
56
57
|
model?: IAIModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectionToken, Type } from '@angular/core';
|
|
2
2
|
import { Provider } from '@angular/core';
|
|
3
|
-
import { ChatUserSettings, IAgentCard, ModelName, IConversationSettingsDTO, IAgentResponseDTO, TTSRequest, AudioGenerated } from './agent.models';
|
|
3
|
+
import { ChatUserSettings, IAgentCard, ModelName, IConversationSettingsDTO, IAgentResponseDTO, TTSRequest, AudioGenerated, TranscriptionsWhisper } from './agent.models';
|
|
4
4
|
import { FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';
|
|
5
5
|
export declare const CONVERSATION_AI_TOKEN: InjectionToken<AgentCardsAbstractService>;
|
|
6
6
|
export declare abstract class AgentCardsAbstractService {
|
|
@@ -20,7 +20,7 @@ export declare abstract class AgentCardsAbstractService {
|
|
|
20
20
|
abstract getConversationUserChatSettings(): Promise<ChatUserSettings>;
|
|
21
21
|
abstract getListModels(provider: string): Promise<ModelName[]>;
|
|
22
22
|
abstract translateConversation(currentLang: string, targetLang: string, id: string): Promise<ChatUserSettings>;
|
|
23
|
-
abstract getAudioTranscriptions(audio:
|
|
23
|
+
abstract getAudioTranscriptions(audio: Blob, options: unknown): Promise<TranscriptionsWhisper>;
|
|
24
24
|
abstract callInstruction(prompt: string, IAIModel: any): Promise<any>;
|
|
25
25
|
abstract saveConversationUserChatSettings(conversation: ChatUserSettings): Promise<ChatUserSettings>;
|
|
26
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Signal } from '@angular/core';
|
|
2
|
-
import { AudioGenerated, ChatMessage, IAgentCard, MessageAudio } from '../models/agent.models';
|
|
2
|
+
import { AudioGenerated, ChatMessage, IAgentCard, IConversationSettings, MessageAudio } from '../models/agent.models';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ConversationService {
|
|
5
5
|
private agentCardService;
|
|
@@ -15,7 +15,9 @@ export declare class ConversationService {
|
|
|
15
15
|
isThinking(): Signal<boolean>;
|
|
16
16
|
setDestroyed(value: boolean): void;
|
|
17
17
|
setupConversationWithAgentCard(agentCard: IAgentCard): void;
|
|
18
|
-
|
|
18
|
+
initConversationWithSettings(conversationSettings: IConversationSettings): Promise<void>;
|
|
19
|
+
private initConversation;
|
|
20
|
+
initConversationWithAgentCard(agentCard: IAgentCard): Promise<void>;
|
|
19
21
|
sendUserMessage(message: ChatMessage): Promise<void>;
|
|
20
22
|
sendCurrentConversation(): Promise<void>;
|
|
21
23
|
resetConversation(agentCard?: IAgentCard): Promise<void>;
|