@dataclouder/ngx-agent-cards 0.0.75
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/README.md +314 -0
- package/fesm2022/dataclouder-ngx-agent-cards.mjs +2872 -0
- package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/chat/dc-chat.component.d.ts +60 -0
- package/lib/components/chat-message/chat-message.component.d.ts +28 -0
- package/lib/components/chat-settings/dc-conversation-userchat-settings.component.d.ts +46 -0
- package/lib/components/dc-agent-card-details/dc-agent-card-details.component.d.ts +18 -0
- package/lib/components/dc-agent-card-lists/agent-card-default-ui/agent-card-default-ui.component.d.ts +15 -0
- package/lib/components/dc-agent-card-lists/dc-agent-card-lists.component.d.ts +42 -0
- package/lib/components/dc-agent-form/dc-agent-card-form.component.d.ts +121 -0
- package/lib/components/dc-agent-form/generic-form/generic-form.component.d.ts +23 -0
- package/lib/components/extraction.regex.d.ts +7 -0
- package/lib/components/icons/icon-map.d.ts +9 -0
- package/lib/components/icons/icons.component.d.ts +15 -0
- package/lib/components/prompt-preview-dialog/prompt-preview-dialog.component.d.ts +11 -0
- package/lib/components/provider-selector/provider-selector.component.d.ts +39 -0
- package/lib/components/translate-dialog/translate-dialog.component.d.ts +22 -0
- package/lib/models/agent.models.d.ts +192 -0
- package/lib/models/agent.utils.d.ts +1 -0
- package/lib/models/conversation-ai.class.d.ts +27 -0
- package/lib/models/conversation-enums.d.ts +47 -0
- package/lib/models/stavernUtils.d.ts +15 -0
- package/lib/models/user-data-exchange.d.ts +16 -0
- package/lib/pipes/scenario.pipe.d.ts +18 -0
- package/lib/pipes/speed.pipe.d.ts +14 -0
- package/lib/pipes/truncate.pipe.d.ts +7 -0
- package/lib/services/audio.service.d.ts +27 -0
- package/lib/services/dc-conversation-builder.service.d.ts +27 -0
- package/package.json +45 -0
- package/public-api.d.ts +15 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
4
|
+
import { ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
5
|
+
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
6
|
+
import { ChatUserSettings, IConversationSettings, ChatMessage, IAgentCard, IMiniAgentCard } from '../../models/agent.models';
|
|
7
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
8
|
+
import { DCConversationPromptBuilderService } from '../../services/dc-conversation-builder.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
export declare class DCChatComponent implements OnInit {
|
|
11
|
+
private agentCardService;
|
|
12
|
+
private toastService;
|
|
13
|
+
private conversationBuilder;
|
|
14
|
+
private dialogService;
|
|
15
|
+
private cdr;
|
|
16
|
+
chatUserSettings: ChatUserSettings;
|
|
17
|
+
agentCard: IAgentCard;
|
|
18
|
+
evaluatorAgentCard: IMiniAgentCard;
|
|
19
|
+
parseDict: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
sendMessage: EventEmitter<string>;
|
|
23
|
+
micSettings: MicSettings;
|
|
24
|
+
conversationSettings: IConversationSettings;
|
|
25
|
+
messages: ChatMessage[];
|
|
26
|
+
imageUser: string;
|
|
27
|
+
thinkingImg: string;
|
|
28
|
+
isDestroyed: boolean;
|
|
29
|
+
score: number;
|
|
30
|
+
isChatSettingsVisible: boolean;
|
|
31
|
+
chatInputControl: FormControl;
|
|
32
|
+
isAIThinking: boolean;
|
|
33
|
+
isUserTalking: boolean;
|
|
34
|
+
aiIcon: string;
|
|
35
|
+
user: any;
|
|
36
|
+
isGettingTranscription: boolean;
|
|
37
|
+
private defaultVoice;
|
|
38
|
+
constructor(agentCardService: AgentCardsAbstractService, toastService: ToastAlertsAbstractService, conversationBuilder: DCConversationPromptBuilderService, dialogService: DialogService, cdr: ChangeDetectorRef);
|
|
39
|
+
alternativeConversation: IAgentCard[];
|
|
40
|
+
ngOnInit(): Promise<void>;
|
|
41
|
+
private buildChatMessage;
|
|
42
|
+
settingsClick(): void;
|
|
43
|
+
ngOnDestroy(): void;
|
|
44
|
+
setAIthinking(): void;
|
|
45
|
+
sendUserMessage(message?: ChatMessage): Promise<void>;
|
|
46
|
+
sendCurrentConversation(): Promise<void>;
|
|
47
|
+
private getVoice;
|
|
48
|
+
setInputText(text: any): void;
|
|
49
|
+
micFinished(eventBlob: any): Promise<void>;
|
|
50
|
+
playMessage(message: ChatMessage): void;
|
|
51
|
+
subsItalicsByTag(text: any, voiceId?: string, tagName?: string): any;
|
|
52
|
+
private processMultiMessages;
|
|
53
|
+
isInfoVisible: boolean;
|
|
54
|
+
showInfo(): void;
|
|
55
|
+
changeConversationCard(): Promise<void>;
|
|
56
|
+
restartConversation(conversation?: IAgentCard): Promise<void>;
|
|
57
|
+
private evaluateConversation;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCChatComponent, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; }; "parseDict": { "alias": "parseDict"; "required": false; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import { TextEngines } from '../../models/conversation-enums';
|
|
4
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
5
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
8
|
+
private dialogRef;
|
|
9
|
+
private fb;
|
|
10
|
+
private conversationCardAIService;
|
|
11
|
+
isLoadingModels: boolean;
|
|
12
|
+
showFeature: any;
|
|
13
|
+
onSettingsChange: EventEmitter<any>;
|
|
14
|
+
textEngines: TextEngines[];
|
|
15
|
+
voiceTTSOptions: import("@dataclouder/ngx-agent-cards").VoiceTTSOption[];
|
|
16
|
+
textEngineOptions: {
|
|
17
|
+
value: TextEngines;
|
|
18
|
+
label: string;
|
|
19
|
+
}[];
|
|
20
|
+
modelnames: any[];
|
|
21
|
+
form: FormGroup<{
|
|
22
|
+
synthVoice: import("@angular/forms").FormControl<boolean>;
|
|
23
|
+
highlightWords: import("@angular/forms").FormControl<boolean>;
|
|
24
|
+
speed: import("@angular/forms").FormControl<number>;
|
|
25
|
+
realTime: import("@angular/forms").FormControl<boolean>;
|
|
26
|
+
repeatRecording: import("@angular/forms").FormControl<boolean>;
|
|
27
|
+
superHearing: import("@angular/forms").FormControl<boolean>;
|
|
28
|
+
fixGrammar: import("@angular/forms").FormControl<boolean>;
|
|
29
|
+
autoTranslate: import("@angular/forms").FormControl<boolean>;
|
|
30
|
+
voice: import("@angular/forms").FormControl<string>;
|
|
31
|
+
model: FormGroup<{
|
|
32
|
+
provider: import("@angular/forms").FormControl<string>;
|
|
33
|
+
modelName: import("@angular/forms").FormControl<string>;
|
|
34
|
+
id: import("@angular/forms").FormControl<string>;
|
|
35
|
+
}>;
|
|
36
|
+
}>;
|
|
37
|
+
tooltipRef: TemplateRef<any>;
|
|
38
|
+
constructor(dialogRef: DynamicDialogRef, fb: FormBuilder, conversationCardAIService: AgentCardsAbstractService);
|
|
39
|
+
isAdmin: boolean;
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
private loadInitialSettings;
|
|
42
|
+
close(): void;
|
|
43
|
+
saveSettings(): Promise<void>;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationUserChatSettingsComponent, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationUserChatSettingsComponent, "dc-chat-settings-dialog", never, { "showFeature": { "alias": "showFeature"; "required": false; }; }, { "onSettingsChange": "onSettingsChange"; }, never, never, true, never>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
3
|
+
import { IAgentCard } from '../../models/agent.models';
|
|
4
|
+
import { ActivatedRoute } from '@angular/router';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DcAgentCardDetailsComponent implements OnInit {
|
|
7
|
+
private agentCardService;
|
|
8
|
+
private route;
|
|
9
|
+
private cdr;
|
|
10
|
+
constructor(agentCardService: AgentCardsAbstractService, route: ActivatedRoute, cdr: ChangeDetectorRef);
|
|
11
|
+
conversationCardId: string;
|
|
12
|
+
onStartConversation: EventEmitter<any>;
|
|
13
|
+
conversation: IAgentCard;
|
|
14
|
+
ngOnInit(): Promise<void>;
|
|
15
|
+
startConversation(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcAgentCardDetailsComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DcAgentCardDetailsComponent, "dc-agent-card-details", never, { "conversationCardId": { "alias": "conversationCardId"; "required": false; }; }, { "onStartConversation": "onStartConversation"; }, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter, type OnInit } from '@angular/core';
|
|
2
|
+
import { IAgentCard } from '../../../models/agent.models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DCConversationCardUIComponent implements OnInit {
|
|
5
|
+
ngOnInit(): void;
|
|
6
|
+
card: IAgentCard;
|
|
7
|
+
onDetailsCard: EventEmitter<string>;
|
|
8
|
+
onEditCard: EventEmitter<string>;
|
|
9
|
+
onDeleteCard: EventEmitter<string>;
|
|
10
|
+
onDetails(): void;
|
|
11
|
+
onEdit(): void;
|
|
12
|
+
onDelete(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationCardUIComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationCardUIComponent, "dc-agent-card-default-ui", never, { "card": { "alias": "card"; "required": false; }; }, { "onDetailsCard": "onDetailsCard"; "onEditCard": "onEditCard"; "onDeleteCard": "onDeleteCard"; }, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, Type, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
3
|
+
import { IAgentCard } from '../../models/agent.models';
|
|
4
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { FiltersConfig, PaginationBase, ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
6
|
+
import { DCConversationCardUIComponent } from './agent-card-default-ui/agent-card-default-ui.component';
|
|
7
|
+
import { NgComponentOutlet } from '@angular/common';
|
|
8
|
+
import { QueryList } from '@angular/core';
|
|
9
|
+
import { MenuItem } from 'primeng/api';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class ConversationCardListsComponent extends PaginationBase implements OnInit, OnDestroy {
|
|
12
|
+
private agentCardService;
|
|
13
|
+
private toastService;
|
|
14
|
+
private cdr;
|
|
15
|
+
customCardComponent?: Type<DCConversationCardUIComponent>;
|
|
16
|
+
gridLayout: boolean;
|
|
17
|
+
getCustomButtons: (card: IAgentCard) => MenuItem[];
|
|
18
|
+
goToDetailsEvent: EventEmitter<string>;
|
|
19
|
+
goToEditEvent: EventEmitter<string>;
|
|
20
|
+
deleteEvent: EventEmitter<string>;
|
|
21
|
+
conversationCards: IAgentCard[];
|
|
22
|
+
private cardEventSubs;
|
|
23
|
+
outlets: QueryList<NgComponentOutlet>;
|
|
24
|
+
cardComponent: Type<DCConversationCardUIComponent>;
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
constructor(agentCardService: AgentCardsAbstractService, toastService: ToastAlertsAbstractService, route: ActivatedRoute, router: Router, cdr: ChangeDetectorRef);
|
|
27
|
+
ngOnInit(): void;
|
|
28
|
+
subscribeDinamicInstantToEvents(): void;
|
|
29
|
+
private subscribeToCardEvents;
|
|
30
|
+
private clearcardEventSubs;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
private loadConversationCards;
|
|
33
|
+
getAllConversationCards(): Promise<IAgentCard[]>;
|
|
34
|
+
goToDetails(id: string): Promise<void>;
|
|
35
|
+
goToEdit(id?: string): Promise<void>;
|
|
36
|
+
deleteCard(id: string): Promise<void>;
|
|
37
|
+
protected loadData(): Promise<void>;
|
|
38
|
+
search(text: string): Promise<void>;
|
|
39
|
+
filterChange(filters: FiltersConfig): Promise<void>;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConversationCardListsComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConversationCardListsComponent, "dc-agent-card-lists", never, { "customCardComponent": { "alias": "customCardComponent"; "required": false; }; "gridLayout": { "alias": "gridLayout"; "required": false; }; "getCustomButtons": { "alias": "getCustomButtons"; "required": false; }; }, { "goToDetailsEvent": "goToDetailsEvent"; "goToEditEvent": "goToEditEvent"; "deleteEvent": "deleteEvent"; }, never, never, true, never>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormArray } from '@angular/forms';
|
|
3
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
5
|
+
import { StorageImageSettings, MultiImagesStorageService } from '@dataclouder/ngx-cloud-storage';
|
|
6
|
+
import { DCConversationPromptBuilderService } from '../../services/dc-conversation-builder.service';
|
|
7
|
+
import { DialogService } from 'primeng/dynamicdialog';
|
|
8
|
+
import { ConversationType, TextEngines } from '../../models/conversation-enums';
|
|
9
|
+
import { EAccountsPlatform, IAgentCard } from '../../models/agent.models';
|
|
10
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class DCAgentCardFormComponent implements OnInit {
|
|
13
|
+
private fb;
|
|
14
|
+
private storageService;
|
|
15
|
+
private agentCardService;
|
|
16
|
+
private cdr;
|
|
17
|
+
private router;
|
|
18
|
+
private activatedRoute;
|
|
19
|
+
dialogService: DialogService;
|
|
20
|
+
private promptBuilder;
|
|
21
|
+
private toastService?;
|
|
22
|
+
textEngines: TextEngines[];
|
|
23
|
+
conversationOptions: {
|
|
24
|
+
value: ConversationType;
|
|
25
|
+
label: string;
|
|
26
|
+
}[];
|
|
27
|
+
voiceTTSOptions: import("@dataclouder/ngx-agent-cards").VoiceTTSOption[];
|
|
28
|
+
conversation: IAgentCard;
|
|
29
|
+
agentCardId: string;
|
|
30
|
+
accountsOptions: EAccountsPlatform[];
|
|
31
|
+
storageSettings: StorageImageSettings;
|
|
32
|
+
bannerImgSettings: StorageImageSettings;
|
|
33
|
+
imageStorageSettings: StorageImageSettings;
|
|
34
|
+
stickerStorageSettings: StorageImageSettings;
|
|
35
|
+
onImageLoaded: EventEmitter<any>;
|
|
36
|
+
onSave: EventEmitter<any>;
|
|
37
|
+
onGoDetails: EventEmitter<string>;
|
|
38
|
+
onTranslate: EventEmitter<any>;
|
|
39
|
+
imageSettings: any;
|
|
40
|
+
textEngineOptions: {
|
|
41
|
+
value: TextEngines;
|
|
42
|
+
label: string;
|
|
43
|
+
}[];
|
|
44
|
+
markdownForm: import("@angular/forms").FormGroup<{
|
|
45
|
+
seeMarkdown: import("@angular/forms").FormControl<boolean>;
|
|
46
|
+
}>;
|
|
47
|
+
private getSettings;
|
|
48
|
+
form: import("@angular/forms").FormGroup<{
|
|
49
|
+
version: import("@angular/forms").FormControl<string>;
|
|
50
|
+
id: import("@angular/forms").FormControl<string>;
|
|
51
|
+
title: import("@angular/forms").FormControl<string>;
|
|
52
|
+
characterCard: import("@angular/forms").FormGroup<{
|
|
53
|
+
data: import("@angular/forms").FormGroup<{
|
|
54
|
+
name: import("@angular/forms").FormControl<string>;
|
|
55
|
+
description: import("@angular/forms").FormControl<string>;
|
|
56
|
+
scenario: import("@angular/forms").FormControl<string>;
|
|
57
|
+
first_mes: import("@angular/forms").FormControl<string>;
|
|
58
|
+
creator_notes: import("@angular/forms").FormControl<string>;
|
|
59
|
+
mes_example: import("@angular/forms").FormControl<string>;
|
|
60
|
+
alternate_greetings: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
61
|
+
tags: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
62
|
+
system_prompt: import("@angular/forms").FormControl<string>;
|
|
63
|
+
post_history_instructions: import("@angular/forms").FormControl<string>;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
conversationSettings: import("@angular/forms").FormGroup<{
|
|
67
|
+
textEngine: import("@angular/forms").FormControl<TextEngines>;
|
|
68
|
+
conversationType: import("@angular/forms").FormControl<ConversationType>;
|
|
69
|
+
autoStart: import("@angular/forms").FormControl<boolean>;
|
|
70
|
+
}>;
|
|
71
|
+
lang: import("@angular/forms").FormControl<string>;
|
|
72
|
+
tts: import("@angular/forms").FormGroup<{
|
|
73
|
+
voice: import("@angular/forms").FormControl<string>;
|
|
74
|
+
secondaryVoice: import("@angular/forms").FormControl<string>;
|
|
75
|
+
speed: import("@angular/forms").FormControl<string>;
|
|
76
|
+
speedRate: import("@angular/forms").FormControl<number>;
|
|
77
|
+
}>;
|
|
78
|
+
metaApp: import("@angular/forms").FormGroup<{
|
|
79
|
+
isPublished: import("@angular/forms").FormControl<boolean>;
|
|
80
|
+
isPublic: import("@angular/forms").FormControl<boolean>;
|
|
81
|
+
authorId: import("@angular/forms").FormControl<string>;
|
|
82
|
+
authorEmail: import("@angular/forms").FormControl<string>;
|
|
83
|
+
takenCount: import("@angular/forms").FormControl<number>;
|
|
84
|
+
}>;
|
|
85
|
+
model: import("@angular/forms").FormGroup<{
|
|
86
|
+
id: import("@angular/forms").FormControl<string>;
|
|
87
|
+
modelName: import("@angular/forms").FormControl<string>;
|
|
88
|
+
provider: import("@angular/forms").FormControl<string>;
|
|
89
|
+
}>;
|
|
90
|
+
accounts: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
91
|
+
}>;
|
|
92
|
+
languageOptions: {
|
|
93
|
+
value: string;
|
|
94
|
+
label: string;
|
|
95
|
+
}[];
|
|
96
|
+
constructor(fb: FormBuilder, storageService: MultiImagesStorageService, agentCardService: AgentCardsAbstractService, cdr: ChangeDetectorRef, router: Router, activatedRoute: ActivatedRoute, dialogService: DialogService, promptBuilder: DCConversationPromptBuilderService, toastService?: ToastAlertsAbstractService);
|
|
97
|
+
ngOnInit(): void;
|
|
98
|
+
private loadConversationCard;
|
|
99
|
+
private patchFormWithConversationData;
|
|
100
|
+
private handleAlternateGreetings;
|
|
101
|
+
saveConversation(): Promise<void>;
|
|
102
|
+
onImageCropped(event: any): void;
|
|
103
|
+
onImageUploaded(event: any, type?: 'image' | 'bannerImg' | 'sticker'): Promise<void>;
|
|
104
|
+
onImageSelected(file: File): Promise<void>;
|
|
105
|
+
addArrayItem(controlPath: string): void;
|
|
106
|
+
removeArrayItem(controlPath: string, index: number): void;
|
|
107
|
+
updateArrayField(controlPath: string, index: number, event: Event): void;
|
|
108
|
+
checkPrompt(): void;
|
|
109
|
+
goToDetails(): void;
|
|
110
|
+
translate(): void;
|
|
111
|
+
checkCdr(): void;
|
|
112
|
+
openDialogNodeRef(htmlRef: any): void;
|
|
113
|
+
downloadConversation(): void;
|
|
114
|
+
importConversation(): void;
|
|
115
|
+
isGenerating: boolean;
|
|
116
|
+
generateCharacter(): Promise<void>;
|
|
117
|
+
private extractJsonFromResponse;
|
|
118
|
+
removeSticker(sticker: any): Promise<void>;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCAgentCardFormComponent, [null, null, null, null, null, null, null, null, { optional: true; }]>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCAgentCardFormComponent, "dc-conversation-form", never, { "storageSettings": { "alias": "storageSettings"; "required": false; }; "bannerImgSettings": { "alias": "bannerImgSettings"; "required": false; }; "imageStorageSettings": { "alias": "imageStorageSettings"; "required": false; }; }, { "onImageLoaded": "onImageLoaded"; "onSave": "onSave"; "onGoDetails": "onGoDetails"; "onTranslate": "onTranslate"; }, never, never, true, never>;
|
|
121
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormArray, FormBuilder } from '@angular/forms';
|
|
3
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
+
import { ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
5
|
+
import { EAccountsPlatform } from '../../../models/agent.models';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class AccountPlatformForm implements OnInit {
|
|
8
|
+
private route;
|
|
9
|
+
private fb;
|
|
10
|
+
private router;
|
|
11
|
+
private toastService;
|
|
12
|
+
formArray: FormArray;
|
|
13
|
+
platformOptions: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: EAccountsPlatform;
|
|
16
|
+
}[];
|
|
17
|
+
constructor(route: ActivatedRoute, fb: FormBuilder, router: Router, toastService: ToastAlertsAbstractService);
|
|
18
|
+
genericId: any;
|
|
19
|
+
ngOnInit(): Promise<void>;
|
|
20
|
+
save(): Promise<void>;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AccountPlatformForm, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AccountPlatformForm, "account-platform-form", never, { "formArray": { "alias": "formArray"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function markdownToHtml(markdown: any): any[];
|
|
2
|
+
export declare function convertToHTML(text: any): any[];
|
|
3
|
+
export declare function markdownToHTML(markdownText: any): any;
|
|
4
|
+
export declare function markdownBasicToHTML(markdownText: any): any;
|
|
5
|
+
export declare function markdownToHTML2(markdown: any): any[];
|
|
6
|
+
export declare function removeEmojis(text: any): any;
|
|
7
|
+
export declare function removeAllEmojis(text: any): any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly gear: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"currentColor\">\n <path d=\"M12 1.75a1.25 1.25 0 0 1 1.25 1.25v.917a8.456 8.456 0 0 1 2.334.98l.645-.647a1.25 1.25 0 1 1 1.768 1.768l-.646.645c.389.69.729 1.437.98 2.334h.917a1.25 1.25 0 0 1 0 2.5h-.917a8.456 8.456 0 0 1-.98 2.334l.646.645a1.25 1.25 0 1 1-1.768 1.768l-.645-.646a8.456 8.456 0 0 1-2.334.98v.917a1.25 1.25 0 0 1-2.5 0v-.917a8.456 8.456 0 0 1-2.334-.98l-.645.646a1.25 1.25 0 1 1-1.768-1.768l.646-.645a8.456 8.456 0 0 1-.98-2.334H1.75a1.25 1.25 0 0 1 0-2.5h.917a8.456 8.456 0 0 1 .98-2.334l-.646-.645a1.25 1.25 0 1 1 1.768-1.768l.645.647c.69-.389 1.437-.729 2.334-.98V3a1.25 1.25 0 0 1 1.25-1.25h.083ZM12 7.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z\"/>\n </svg>\n ";
|
|
3
|
+
readonly chat: "<svg viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c...\" />\n </svg>";
|
|
4
|
+
readonly play: "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#263042\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <polygon points=\"10 8 16 12 10 16 10 8\"></polygon>\n </svg>";
|
|
5
|
+
readonly loading: "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"#263042\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"6\"></line>\n <line x1=\"12\" y1=\"18\" x2=\"12\" y2=\"22\"></line>\n <line x1=\"4.93\" y1=\"4.93\" x2=\"7.76\" y2=\"7.76\"></line>\n <line x1=\"16.24\" y1=\"16.24\" x2=\"19.07\" y2=\"19.07\"></line>\n <line x1=\"2\" y1=\"12\" x2=\"6\" y2=\"12\"></line>\n <line x1=\"18\" y1=\"12\" x2=\"22\" y2=\"12\"></line>\n <line x1=\"4.93\" y1=\"19.07\" x2=\"7.76\" y2=\"16.24\"></line>\n <line x1=\"16.24\" y1=\"7.76\" x2=\"19.07\" y2=\"4.93\"></line>\n </svg>";
|
|
6
|
+
readonly user: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <!-- Head circle -->\n <circle cx=\"12\" cy=\"8\" r=\"4\" fill=\"currentColor\"/>\n \n <!-- Body shape -->\n <path d=\"M20 19v1a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1c0-3.87 3.13-7 7-7h2c3.87 0 7 3.13 7 7z\" fill=\"currentColor\"/>\n</svg>";
|
|
7
|
+
readonly ai: "<svg \n xmlns=\"http://www.w3.org/2000/svg\" \n viewBox=\"0 0 100 100\" \n width=\"100\" \n height=\"100\" \n fill=\"none\" \n stroke=\"black\" \n stroke-width=\"2\"\n>\n <!-- Brain outline -->\n <path \n d=\"M50 10\n C60 10, 70 20, 70 30\n S60 50, 50 50\n S30 40, 30 30\n S40 10, 50 10Z\"\n fill=\"#B3E5FC\"\n />\n \n <!-- Circuit lines -->\n <line x1=\"50\" y1=\"50\" x2=\"50\" y2=\"70\" stroke=\"#0288D1\" stroke-width=\"2\" />\n <line x1=\"50\" y1=\"70\" x2=\"40\" y2=\"80\" stroke=\"#0288D1\" stroke-width=\"2\" />\n <line x1=\"50\" y1=\"70\" x2=\"60\" y2=\"80\" stroke=\"#0288D1\" stroke-width=\"2\" />\n \n <!-- Nodes -->\n <circle cx=\"50\" cy=\"70\" r=\"2\" fill=\"#0288D1\" />\n <circle cx=\"40\" cy=\"80\" r=\"3\" fill=\"#0288D1\" />\n <circle cx=\"60\" cy=\"80\" r=\"3\" fill=\"#0288D1\" />\n</svg>\n";
|
|
8
|
+
};
|
|
9
|
+
export type IconName = keyof typeof ICONS;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { IconName } from './icon-map';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class IconsComponent implements OnChanges {
|
|
6
|
+
private sanitizer;
|
|
7
|
+
name: IconName;
|
|
8
|
+
size: number;
|
|
9
|
+
color: string;
|
|
10
|
+
sanitizedIcon: SafeHtml;
|
|
11
|
+
constructor(sanitizer: DomSanitizer);
|
|
12
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconsComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconsComponent, "dc-icon", never, { "name": { "alias": "name"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class PromptPreviewDialogComponent {
|
|
4
|
+
private dynamicDialogConfig;
|
|
5
|
+
dialogRef: DynamicDialogRef<void>;
|
|
6
|
+
data: any;
|
|
7
|
+
constructor(dynamicDialogConfig: DynamicDialogConfig, dialogRef: DynamicDialogRef<void>);
|
|
8
|
+
close(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptPreviewDialogComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptPreviewDialogComponent, "dc-prompt-preview-dialog", never, {}, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* A component that provides AI model provider selection functionality.
|
|
7
|
+
* This component allows users to select an AI provider and displays available models
|
|
8
|
+
* for the selected provider, you need to handle values logic in the parent component.
|
|
9
|
+
* you have to pass the parent form group to the component, with controls: provider and modelName.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <dc-provider-selector
|
|
14
|
+
* [parentForm]="yourFormGroup">
|
|
15
|
+
* </dc-provider-selector>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class ProviderSelectorComponent implements OnInit {
|
|
19
|
+
private conversationCardAIService;
|
|
20
|
+
private cdr;
|
|
21
|
+
/** Parent form group that contains provider and model selection controls */
|
|
22
|
+
parentForm: FormGroup<{
|
|
23
|
+
provider: any;
|
|
24
|
+
modelName: any;
|
|
25
|
+
id: any;
|
|
26
|
+
}>;
|
|
27
|
+
/** Flag indicating whether the models are currently being loaded */
|
|
28
|
+
isLoadingModels: boolean;
|
|
29
|
+
/** Array of available models for the selected provider */
|
|
30
|
+
modelnames: any[];
|
|
31
|
+
constructor(conversationCardAIService: AgentCardsAbstractService, cdr: ChangeDetectorRef);
|
|
32
|
+
/**
|
|
33
|
+
* Initializes the component by setting up subscriptions to provider changes
|
|
34
|
+
* and loading initial models if a provider is already selected.
|
|
35
|
+
*/
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProviderSelectorComponent, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProviderSelectorComponent, "dc-provider-selector", never, { "parentForm": { "alias": "parentForm"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DialogRef } from '@angular/cdk/dialog';
|
|
2
|
+
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TranslateDialogComponent {
|
|
5
|
+
private fb;
|
|
6
|
+
private dialogRef;
|
|
7
|
+
data: {
|
|
8
|
+
currentLang: string;
|
|
9
|
+
};
|
|
10
|
+
form: FormGroup;
|
|
11
|
+
languages: {
|
|
12
|
+
code: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}[];
|
|
15
|
+
constructor(fb: FormBuilder, dialogRef: DialogRef<string>, data: {
|
|
16
|
+
currentLang: string;
|
|
17
|
+
});
|
|
18
|
+
onCancel(): void;
|
|
19
|
+
onConfirm(): void;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateDialogComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TranslateDialogComponent, "dc-translate-dialog", never, {}, {}, never, never, true, never>;
|
|
22
|
+
}
|