@dataclouder/ngx-agent-cards 0.1.24 → 0.1.26

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.
@@ -1,19 +1,23 @@
1
1
  import { type OnInit } from '@angular/core';
2
- import { IAgentCard, IAgentCardMeta } from '../../../models/agent.models';
2
+ import { IAgentCard } from '../../../models/agent.models';
3
3
  import { MenuItem } from 'primeng/api';
4
+ import { OnActionEvent } from '@dataclouder/ngx-core';
4
5
  import * as i0 from "@angular/core";
5
- export declare class DCConversationCardUIComponent implements OnInit {
6
+ declare enum EventCard {
7
+ Edit = "edit",
8
+ Delete = "delete",
9
+ Select = "select",
10
+ Clone = "clone"
11
+ }
12
+ export declare class AgentCardUI implements OnInit {
13
+ eventType: typeof EventCard;
6
14
  speedDialModel: MenuItem[];
7
15
  ngOnInit(): void;
8
- readonly card: import("@angular/core").InputSignal<IAgentCardMeta>;
16
+ readonly card: import("@angular/core").InputSignal<IAgentCard>;
9
17
  readonly showOptions: import("@angular/core").InputSignal<boolean>;
10
- readonly onCardAction: import("@angular/core").OutputEmitterRef<{
11
- event: string;
12
- card: IAgentCard;
13
- }>;
14
- onDetails(): void;
15
- onEdit(): void;
16
- onDelete(): void;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationCardUIComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationCardUIComponent, "dc-agent-card-default-ui", never, { "card": { "alias": "card"; "required": false; "isSignal": true; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; }, { "onCardAction": "onCardAction"; }, never, never, true, never>;
18
+ readonly onAction: import("@angular/core").OutputEmitterRef<OnActionEvent>;
19
+ eventCard(eventType: EventCard): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgentCardUI, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentCardUI, "dc-agent-card-ui", never, { "card": { "alias": "card"; "required": false; "isSignal": true; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
19
22
  }
23
+ export {};
@@ -1,44 +1,25 @@
1
- import { OnInit, Type, OnDestroy } from '@angular/core';
2
- import { IAgentCard } from '../../models/agent.models';
3
- import { FiltersConfig, PaginationBase, PColumn, OnActionEvent, ListFilterBarOptions } from '@dataclouder/ngx-core';
4
- import { DCConversationCardUIComponent } from './agent-card-default-ui/agent-card-default-ui.component';
5
- import { NgComponentOutlet } from '@angular/common';
6
- import { QueryList } from '@angular/core';
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { IAgentCard, IAgentCardMeta } from '../../models/agent.models';
3
+ import { EntityBaseListComponent, PColumn, OnActionEvent, ICustomFilter } from '@dataclouder/ngx-core';
7
4
  import { MenuItem } from 'primeng/api';
5
+ import { DefaultAgentCardsService } from '../../services/default-agent-service';
8
6
  import * as i0 from "@angular/core";
9
- export declare class AgentCardListComponent extends PaginationBase implements OnInit, OnDestroy {
10
- private agentCardService;
11
- private toastService;
12
- private cdr;
13
- viewMode: 'cards' | 'table';
14
- readonly customCardComponent: import("@angular/core").InputSignal<Type<DCConversationCardUIComponent>>;
7
+ export declare class AgentCardListComponent extends EntityBaseListComponent<IAgentCard> implements OnInit, OnDestroy {
8
+ customFilters: ICustomFilter[];
15
9
  readonly showOptions: import("@angular/core").InputSignal<boolean>;
16
10
  readonly gridLayout: import("@angular/core").InputSignal<boolean>;
17
- readonly getCustomButtons: import("@angular/core").InputSignal<(card: IAgentCard) => MenuItem[]>;
18
- outlets: QueryList<NgComponentOutlet>;
19
- protected columns: PColumn[];
20
- agentCards: import("@angular/core").WritableSignal<IAgentCard[]>;
21
- private cardEventSubs;
22
- cardComponent: Type<DCConversationCardUIComponent>;
23
- filterBarOptions: ListFilterBarOptions;
24
- ngOnInit(): void;
25
- subscribeDinamicInstantToEvents(): void;
26
- private subscribeToCardEvents;
27
- private clearCardEventSubs;
11
+ readonly customGetButtons: import("@angular/core").InputSignal<(card: IAgentCard) => MenuItem[]>;
12
+ protected entityCommunicationService: DefaultAgentCardsService;
13
+ private toastService;
14
+ columns: PColumn[];
15
+ constructor();
16
+ getCustomButtons(item: IAgentCard): MenuItem[];
17
+ ngOnInit(): Promise<void>;
28
18
  ngOnDestroy(): void;
29
- private findAgentCards;
30
- getAllConversationCards(): Promise<IAgentCard[]>;
31
- goToDetails(action: {
32
- action: string;
33
- item: IAgentCard;
34
- }): Promise<void>;
35
- deleteCard(id: string): Promise<void>;
36
- protected loadData(): Promise<void>;
37
- doFilterBarAction({ action, item }: OnActionEvent): void;
38
- newAgentCard(): void;
39
- search(text: string): Promise<void>;
40
- filterChange(filters: FiltersConfig): Promise<void>;
41
- protected onCardAction(actionEvent: OnActionEvent): void;
19
+ handleTableAction(actionEvent: OnActionEvent): void;
20
+ getCardMeta(card: IAgentCard): IAgentCardMeta;
21
+ handleAction(actionEvent: OnActionEvent): void;
22
+ applyFilterBarEvent(filterEvent: OnActionEvent): void;
42
23
  static ɵfac: i0.ɵɵFactoryDeclaration<AgentCardListComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<AgentCardListComponent, "dc-agent-card-lists", never, { "viewMode": { "alias": "viewMode"; "required": false; }; "customCardComponent": { "alias": "customCardComponent"; "required": false; "isSignal": true; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; "gridLayout": { "alias": "gridLayout"; "required": false; "isSignal": true; }; "getCustomButtons": { "alias": "getCustomButtons"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentCardListComponent, "dc-agent-card-lists", never, { "customFilters": { "alias": "customFilters"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; "gridLayout": { "alias": "gridLayout"; "required": false; "isSignal": true; }; "customGetButtons": { "alias": "customGetButtons"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
44
25
  }
@@ -1,23 +1,16 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { FormArray, FormGroup } from '@angular/forms';
3
- import { AudioSpeed } from '@dataclouder/ngx-core';
4
- import { StorageImageSettings, CloudStorageData } from '@dataclouder/ngx-cloud-storage';
2
+ import { StorageImageSettings, IAssetable } from '@dataclouder/ngx-cloud-storage';
5
3
  import { ConversationType, TextEngines } from '../../models/conversation-enums';
6
- import { EAccountsPlatform, IAgentCard, ConversationEvents } from '../../models/agent.models';
4
+ import { IAgentCard } from '../../models/agent.models';
5
+ import { EntityBaseFormComponent } from '@dataclouder/ngx-core';
7
6
  import * as i0 from "@angular/core";
8
- export declare class DCAgentCardFormComponent implements OnInit {
7
+ export declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCard> {
9
8
  private fb;
10
- private storageService;
11
- private agentCardService;
12
- private cdr;
13
- private router;
14
- private activatedRoute;
9
+ protected entityCommunicationService: import("@dataclouder/ngx-agent-cards").DefaultAgentCardsService;
15
10
  private dialogService;
16
11
  private promptBuilder;
17
12
  private toastService;
18
- private defaultAgentCardService;
19
13
  private formGroupService;
20
- textEngines: TextEngines[];
21
14
  conversationOptions: {
22
15
  value: ConversationType;
23
16
  label: string;
@@ -27,91 +20,33 @@ export declare class DCAgentCardFormComponent implements OnInit {
27
20
  value: TextEngines;
28
21
  label: string;
29
22
  }[];
30
- accountsOptions: EAccountsPlatform[];
31
23
  languageOptions: {
32
24
  value: string;
33
25
  label: string;
34
26
  }[];
35
- conversationEvents: typeof ConversationEvents;
36
- modelQualityOptions: {
37
- label: string;
38
- value: import("@dataclouder/ngx-core").EModelQuality;
39
- }[];
40
- objectKeys: {
41
- (o: object): string[];
42
- (o: {}): string[];
43
- };
44
- conversation: IAgentCard;
45
- agentCardId: string;
46
- imageSettings: any;
47
- audioSpeedOptions: {
48
- label: string;
49
- value: AudioSpeed;
50
- }[];
51
27
  readonly storageSettings: import("@angular/core").InputSignal<StorageImageSettings>;
52
- readonly bannerImgSettings: import("@angular/core").InputSignal<StorageImageSettings>;
53
- readonly imageStorageSettings: import("@angular/core").InputSignal<StorageImageSettings>;
54
- stickerStorageSettings: StorageImageSettings;
55
- readonly onImageLoaded: import("@angular/core").OutputEmitterRef<any>;
56
28
  readonly onSave: import("@angular/core").OutputEmitterRef<any>;
57
29
  readonly onGoDetails: import("@angular/core").OutputEmitterRef<string>;
58
30
  readonly onTranslate: import("@angular/core").OutputEmitterRef<any>;
59
31
  private getSettings;
60
- form: FormGroup<{
61
- version: import("@angular/forms").FormControl<string>;
62
- id: import("@angular/forms").FormControl<string>;
63
- title: import("@angular/forms").FormControl<string>;
64
- description: import("@angular/forms").FormControl<string>;
65
- lang: import("@angular/forms").FormControl<string>;
66
- characterCard: FormGroup<any>;
67
- conversationSettings: FormGroup<{
68
- textEngine: import("@angular/forms").FormControl<TextEngines>;
69
- conversationType: import("@angular/forms").FormControl<ConversationType>;
70
- autoStart: import("@angular/forms").FormControl<boolean>;
71
- tts: FormGroup<{
72
- voice: import("@angular/forms").FormControl<string>;
73
- secondaryVoice: import("@angular/forms").FormControl<string>;
74
- speed: import("@angular/forms").FormControl<string>;
75
- speedRate: import("@angular/forms").FormControl<number>;
76
- }>;
77
- model: FormGroup<{
78
- quality: import("@angular/forms").FormControl<import("@dataclouder/ngx-core").EModelQuality>;
79
- modelName: import("@angular/forms").FormControl<string>;
80
- provider: import("@angular/forms").FormControl<string>;
81
- id: import("@angular/forms").FormControl<string>;
82
- }>;
83
- }>;
84
- metaApp: FormGroup<any>;
85
- accounts: FormArray<import("@angular/forms").FormControl<unknown>>;
86
- conversationFlow: FormGroup<{
87
- goal: import("@dataclouder/ngx-agent-cards").SimpleAgentTaskFormGroup;
88
- triggerTasks: import("@dataclouder/ngx-agent-cards").TriggerTasksFormGroup;
89
- bonus: import("@angular/forms").FormControl<string>;
90
- dynamicConditions: FormArray<import("@dataclouder/ngx-agent-cards").DynamicConditionFormGroup>;
91
- }>;
92
- }>;
93
- ngOnInit(): void;
94
- private loadConversationCard;
95
- private patchFormWithConversationData;
96
- private handleArrayForms;
97
- saveConversation(): Promise<void>;
98
- onImageCropped(event: any): void;
99
- onImageUploaded(event: any, type?: 'image' | 'bannerImg' | 'sticker'): Promise<void>;
32
+ form: FormGroup;
33
+ constructor();
34
+ protected patchForm(agentCard: IAgentCard): void;
35
+ get conversationSettings(): FormGroup;
36
+ get characterCard(): FormGroup;
37
+ get conversationFlow(): FormGroup;
38
+ get accounts(): FormArray;
39
+ save(): Promise<IAgentCard | undefined>;
100
40
  onImageSelected(file: File): Promise<void>;
101
41
  checkPrompt(): void;
102
42
  goToDetails(): void;
103
43
  translate(): void;
104
- openDialogNodeRef(htmlRef: any): void;
105
44
  downloadConversation(): void;
106
45
  importConversation(): void;
107
- isGenerating: boolean;
46
+ isGenerating: import("@angular/core").WritableSignal<boolean>;
108
47
  generateCharacter(): Promise<void>;
109
- removeSticker(sticker: any): Promise<void>;
110
48
  generateMissingData(): Promise<void>;
111
- generateMainImage(): Promise<void>;
112
- openVoiceSelector(primary?: boolean): void;
113
- openConversationTypeDialog(): void;
114
- onMotionUploaded(event: CloudStorageData): Promise<void>;
49
+ onAssetsChange(newAssets: IAssetable): void;
115
50
  static ɵfac: i0.ɵɵFactoryDeclaration<DCAgentCardFormComponent, never>;
116
- static ɵcmp: i0.ɵɵComponentDeclaration<DCAgentCardFormComponent, "dc-agent-form", never, { "storageSettings": { "alias": "storageSettings"; "required": false; "isSignal": true; }; "bannerImgSettings": { "alias": "bannerImgSettings"; "required": false; "isSignal": true; }; "imageStorageSettings": { "alias": "imageStorageSettings"; "required": false; "isSignal": true; }; }, { "onImageLoaded": "onImageLoaded"; "onSave": "onSave"; "onGoDetails": "onGoDetails"; "onTranslate": "onTranslate"; }, never, never, true, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<DCAgentCardFormComponent, "dc-agent-form", never, { "storageSettings": { "alias": "storageSettings"; "required": false; "isSignal": true; }; }, { "onSave": "onSave"; "onGoDetails": "onGoDetails"; "onTranslate": "onTranslate"; }, never, never, true, never>;
117
52
  }
@@ -0,0 +1,16 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import { VoiceTTSOptions, ConversationTypeOptions, TextEngineOptions } from '../../../models/conversation-enums';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DcConversationSettingsFormComponent {
5
+ form: FormGroup;
6
+ textEngineOptions: typeof TextEngineOptions;
7
+ conversationOptions: typeof ConversationTypeOptions;
8
+ voiceTTSOptions: typeof VoiceTTSOptions;
9
+ private dialogService;
10
+ get mainVoiceFormGroup(): FormGroup;
11
+ get secondaryVoiceFormGroup(): FormGroup;
12
+ get modelFormGroup(): FormGroup;
13
+ openConversationTypeDialog(): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcConversationSettingsFormComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcConversationSettingsFormComponent, "dc-conversation-settings-form", never, { "form": { "alias": "form"; "required": false; }; "textEngineOptions": { "alias": "textEngineOptions"; "required": false; }; "conversationOptions": { "alias": "conversationOptions"; "required": false; }; "voiceTTSOptions": { "alias": "voiceTTSOptions"; "required": false; }; }, {}, never, never, true, never>;
16
+ }
@@ -0,0 +1,12 @@
1
+ import { FormGroup } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DcVoiceTtsFormComponent {
4
+ private dialogService;
5
+ private cdr;
6
+ form: import("@angular/core").InputSignal<FormGroup<any>>;
7
+ title: import("@angular/core").InputSignal<string>;
8
+ voiceTTSOptions: import("@angular/core").InputSignal<any[]>;
9
+ openVoiceSelector(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcVoiceTtsFormComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcVoiceTtsFormComponent, "dc-voice-tts-form", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "voiceTTSOptions": { "alias": "voiceTTSOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ }
@@ -2,21 +2,20 @@ 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, IDynamicCondition, SimpleAgentTask } from '../../models/agent.models';
5
+ import { DoAction, IAgentCard, IDynamicCondition, 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;
10
+ patchFormWithConversationData(form: FormGroup, agentCard: IAgentCard): void;
11
+ handleArrayForms(form: FormGroup, agentCard: IAgentCard): void;
9
12
  createCharacterCardFormGroup(): FormGroup;
10
13
  createConversationSettingFormGroup(): FormGroup<{
11
14
  textEngine: FormControl<TextEngines>;
12
15
  conversationType: FormControl<ConversationType>;
13
16
  autoStart: FormControl<boolean>;
14
- tts: FormGroup<{
15
- voice: FormControl<string>;
16
- secondaryVoice: FormControl<string>;
17
- speed: FormControl<string>;
18
- speedRate: FormControl<number>;
19
- }>;
17
+ mainVoice: FormGroup<any>;
18
+ secondaryVoice: FormGroup<any>;
20
19
  model: FormGroup<{
21
20
  quality: FormControl<EModelQuality>;
22
21
  modelName: FormControl<string>;
@@ -32,6 +31,7 @@ export declare class FormGroupService {
32
31
  provider: FormControl<string>;
33
32
  quality: FormControl<EModelQuality>;
34
33
  }>;
34
+ createVoiceTTSFormGroup(tts?: VoiceTTS): FormGroup;
35
35
  createConversationFlowFormGroup(): ConversationFlowFormGroup;
36
36
  createDynamicConditionFormGroup(condition?: IDynamicCondition): DynamicConditionFormGroup;
37
37
  createDoActionFormGroup(action?: DoAction): DoActionFormGroup;
@@ -20,7 +20,9 @@ export declare const DoActionTypeOptions: {
20
20
  }[];
21
21
  export declare enum SystemPromptType {
22
22
  SystemPrompt = "systemPrompt",
23
+ Language = "language",
23
24
  ConversationType = "conversationType",
25
+ PictureDescription = "pictureDescription",
24
26
  UserInformation = "userInformation",
25
27
  CharacterDescription = "characterDescription",
26
28
  ScenarioDescription = "scenarioDescription",
@@ -27,6 +27,7 @@ export declare class TextHighlighterComponent implements OnDestroy {
27
27
  classTag: import("@angular/core").Signal<string>;
28
28
  hasTranscription: import("@angular/core").Signal<boolean>;
29
29
  private audioElement;
30
+ private audioEffect;
30
31
  private destroy$;
31
32
  private destroyRef;
32
33
  constructor();
@@ -1,30 +1,5 @@
1
1
  import { InjectionToken, Type } from '@angular/core';
2
2
  import { Provider } from '@angular/core';
3
- import { IAgentCard, ModelName, IConversationSettingsDTO, IAgentResponseDTO, TTSRequest, AudioGenerated, TranscriptionsWhisper } from './agent.models';
4
- import { ChatUserSettings, FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';
5
- export declare const CONVERSATION_AI_TOKEN: InjectionToken<AgentCardsAbstractService>;
6
- export declare abstract class AgentCardsAbstractService {
7
- abstract callChatCompletion(conversation: IConversationSettingsDTO): Promise<IAgentResponseDTO>;
8
- abstract findAgentCardByID(id: string): Promise<IAgentCard>;
9
- abstract filterConversationCards(filters: FiltersConfig): Promise<{
10
- rows: IAgentCard[];
11
- count: number;
12
- skip: number;
13
- }>;
14
- abstract getAllConversationCards(): Promise<IAgentCard[]>;
15
- abstract findFilteredAgentCards(paginator: FiltersConfig): Promise<IFilterQueryResponse<IAgentCard>>;
16
- abstract findAgentCardByTitle(title: string): Promise<IAgentCard>;
17
- abstract saveAgentCard(conversation: IAgentCard): Promise<IAgentCard>;
18
- abstract partialUpdateAgentCard(partialAgentCard: IAgentCard): Promise<IAgentCard>;
19
- abstract deleteAgentCard(id: string): Promise<IAgentCard>;
20
- abstract getTextAudioFile(tts: TTSRequest): Promise<AudioGenerated>;
21
- abstract getConversationUserChatSettings(): Promise<ChatUserSettings>;
22
- abstract getListModels(provider: string): Promise<ModelName[]>;
23
- abstract translateConversation(currentLang: string, targetLang: string, id: string): Promise<ChatUserSettings>;
24
- abstract getAudioTranscriptions(audio: Blob, options: unknown): Promise<TranscriptionsWhisper>;
25
- abstract callInstruction(prompt: string, IAIModel: any): Promise<any>;
26
- abstract saveConversationUserChatSettings(conversation: ChatUserSettings): Promise<ChatUserSettings>;
27
- abstract completeAgentCard(idCard: string): Promise<any>;
28
- abstract generateMainImage(idCard: string): Promise<any>;
29
- }
30
- export declare function provideChatAIService(serviceImplementation: Type<AgentCardsAbstractService>): Provider[];
3
+ import { DefaultAgentCardsService } from '../services/default-agent-service';
4
+ export declare const CONVERSATION_AI_TOKEN: InjectionToken<DefaultAgentCardsService>;
5
+ export declare function provideAgentCardService(serviceImplementation: Type<DefaultAgentCardsService>): Provider[];
@@ -1,7 +1,8 @@
1
- import { CloudStorageData, ImgStorageData } from '@dataclouder/ngx-cloud-storage';
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
4
  import { EDoActionType, SystemPromptType } from '../components/dc-agent-form/form-group.utils';
5
+ import { AudioEffectType } from '@dataclouder/ngx-vertex';
5
6
  export interface Appearance {
6
7
  generalDescription: string;
7
8
  physicalDescription: string;
@@ -22,6 +23,7 @@ export interface CharacterCardData {
22
23
  post_history_instructions?: string;
23
24
  character_version?: string;
24
25
  extensions?: Record<string, any>;
26
+ picture_description?: string;
25
27
  appearance?: Appearance;
26
28
  }
27
29
  export declare const characterCardStringDataDefinition = "\ninterface CharacterCardData {\n name: string; // Character's name\n description: string; // General character description\n scenario: string; // The setting or context where the character exists\n first_mes: string; // First message the character will say\n mes_example: string; // Example of character's typical message/dialogue\n alternate_greetings: string[]; // Array of alternative greeting messages\n tags: string[]; // Array of descriptive tags\n appearance: string; // Physical description including height, build, hair color/style, eye color, skin tone, distinctive marks, clothing style, current outfit\n}";
@@ -46,17 +48,27 @@ export interface IAgentMetadata {
46
48
  takenCount: number;
47
49
  level: number;
48
50
  }
51
+ export interface VoiceTTS {
52
+ voice: string;
53
+ speedRate?: number;
54
+ lang?: string;
55
+ effect?: string;
56
+ model?: string;
57
+ provider?: string;
58
+ options?: Record<string, any>;
59
+ }
49
60
  export interface IConversationSettings {
61
+ modelQuality?: EModelQuality;
50
62
  textEngine?: TextEngines;
51
63
  conversationType?: ConversationType;
52
64
  tts?: ITTS;
53
65
  autoStart?: boolean;
54
66
  messages?: ChatMessage[];
55
67
  last_prompt?: string;
56
- voice?: string;
57
- secondaryVoice?: string;
58
68
  repeatRecording?: boolean;
59
69
  model?: IAIModel;
70
+ mainVoice?: VoiceTTS;
71
+ secondaryVoice?: VoiceTTS;
60
72
  }
61
73
  export type IConversationSettingsDTO = Partial<IConversationSettings> & {
62
74
  returnJson?: boolean;
@@ -122,7 +134,7 @@ export interface IAgentCard {
122
134
  title?: string;
123
135
  description?: string;
124
136
  lang?: string;
125
- assets?: IAgentAssets;
137
+ assets?: IAssetable;
126
138
  image?: ImgStorageData;
127
139
  characterCard?: ICharacterCardDC;
128
140
  conversationSettings?: IConversationSettings;
@@ -205,6 +217,7 @@ export declare class MessageContent {
205
217
  tag?: string;
206
218
  imgUrl?: string;
207
219
  ssml?: string;
220
+ audioEffect?: AudioEffectType;
208
221
  }
209
222
  export declare enum ChatRole {
210
223
  System = "system",
@@ -1,20 +1,17 @@
1
- import { AgentCardsAbstractService } from '../models/agent-card-abstract.model';
2
1
  import { IConversationSettingsDTO, IAgentResponseDTO, IAgentCard, TTSRequest, AudioGenerated, ModelName, TranscriptionsWhisper } from '../models/agent.models';
3
- import { FiltersConfig, IFilterQueryResponse, HttpCoreService, ChatUserSettings, IAIModel } from '@dataclouder/ngx-core';
2
+ import { FiltersConfig, IFilterQueryResponse, ChatUserSettings, IAIModel, EntityCommunicationService } from '@dataclouder/ngx-core';
4
3
  import * as i0 from "@angular/core";
5
- export declare class DefaultAgentCardsService implements AgentCardsAbstractService {
6
- protected httpService: HttpCoreService;
4
+ export declare class DefaultAgentCardsService extends EntityCommunicationService<IAgentCard> {
5
+ constructor();
7
6
  partialUpdateAgentCard(agentCard: IAgentCard): Promise<IAgentCard>;
8
7
  generateMainImage(idCard: string): Promise<any>;
9
8
  completeAgentCard(idCard: string): Promise<any>;
10
9
  callChatCompletion(conversation: IConversationSettingsDTO): Promise<IAgentResponseDTO>;
11
- findAgentCardByID(id: string): Promise<IAgentCard>;
12
10
  filterConversationCards(filters: FiltersConfig): Promise<IFilterQueryResponse<IAgentCard>>;
13
11
  getAllConversationCards(): Promise<IAgentCard[]>;
14
12
  findFilteredAgentCards(paginator: FiltersConfig): Promise<IFilterQueryResponse<IAgentCard>>;
15
13
  findAgentCardByTitle(title: string): Promise<IAgentCard>;
16
- saveAgentCard(conversation: IAgentCard): Promise<IAgentCard>;
17
- deleteAgentCard(id: string): Promise<IAgentCard>;
14
+ remove(id: string): Promise<void>;
18
15
  getTextAudioFile(tts: TTSRequest): Promise<AudioGenerated>;
19
16
  getConversationUserChatSettings(): Promise<ChatUserSettings>;
20
17
  getListModels(provider: string): Promise<ModelName[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
@@ -1,24 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- interface Voice {
4
- name: string;
5
- id: string;
6
- }
7
- interface Language {
8
- name: string;
9
- code: string;
10
- }
11
- export declare class VoiceSelectorComponent implements OnInit {
12
- private dialogRef;
13
- private config;
14
- availableLanguages: Language[];
15
- selectedLanguageCode: string | null;
16
- voices: Voice[];
17
- selectedVoiceId: string | null;
18
- ngOnInit(): void;
19
- selectVoice(): void;
20
- cancel(): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<VoiceSelectorComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<VoiceSelectorComponent, "dc-voice-selector", never, {}, {}, never, never, true, never>;
23
- }
24
- export {};