@dataclouder/ngx-agent-cards 0.1.56 → 0.1.58

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ImgStorageData, BasicStorage, AudioStorage, IAssetable, StorageImageSettings, FileStorageData } from '@dataclouder/ngx-cloud-storage';
2
2
  import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
3
- import { ChatUserSettings, EModelQuality, IAIModel, IManageable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent } from '@dataclouder/ngx-core';
3
+ import { ChatUserSettings, EModelQuality, IAuditable, IAIModel, IManageable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent, formatCamelCaseString } from '@dataclouder/ngx-core';
4
4
  import * as _angular_forms from '@angular/forms';
5
5
  import { FormGroup, FormControl, FormArray } from '@angular/forms';
6
6
  import { AudioEffectType, TTSRequest } from '@dataclouder/ngx-vertex';
@@ -13,6 +13,7 @@ import * as _dataclouder_ngx_agent_cards from '@dataclouder/ngx-agent-cards';
13
13
  import * as _dataclouder_ngx_knowledge from '@dataclouder/ngx-knowledge';
14
14
  import { MasterStateService } from '@dataclouder/ngx-knowledge';
15
15
  import { MenuItem } from 'primeng/api';
16
+ import * as _angular_router from '@angular/router';
16
17
 
17
18
  declare const defaultconvUserSettings: ChatUserSettings;
18
19
  declare class VoiceTTSOption {
@@ -168,6 +169,15 @@ type ConversationSettingsFormGroup = FormGroup<{
168
169
  }>;
169
170
  }>;
170
171
 
172
+ interface IConversationRule {
173
+ _id: string;
174
+ id: string;
175
+ name?: string;
176
+ description?: string;
177
+ rule?: string;
178
+ auditable?: IAuditable;
179
+ }
180
+
171
181
  interface Appearance {
172
182
  generalDescription: string;
173
183
  physicalDescription: string;
@@ -248,12 +258,19 @@ interface VoiceTTS {
248
258
  provider?: string;
249
259
  options?: Record<string, any>;
250
260
  }
261
+
262
+ interface IRule {
263
+ name: string;
264
+ description: string;
265
+ }
251
266
  interface IConversationSettings {
252
267
  modelQuality?: EModelQuality;
268
+ rules?: IConversationRule[];
253
269
  textEngine?: TextEngines;
254
270
  conversationType?: ConversationType$1;
255
271
  tts?: ITTS;
256
272
  autoStart?: boolean;
273
+ userMustStart?: boolean;
257
274
  messages?: ChatMessage[];
258
275
  last_prompt?: string;
259
276
  repeatRecording?: boolean;
@@ -436,6 +453,13 @@ declare enum ChatRole {
436
453
  Assistant = "assistant",
437
454
  AssistantHelper = "assistantHelper"
438
455
  }
456
+ declare enum SectionType {
457
+ Intro = "intro",
458
+ Persona = "persona",
459
+ Context = "context",
460
+ Rules = "rules",
461
+ Conversation = "conversation"
462
+ }
439
463
  declare class ChatMessage extends MessageContent {
440
464
  role: ChatRole;
441
465
  translation?: string;
@@ -447,6 +471,7 @@ declare class ChatMessage extends MessageContent {
447
471
  tags?: string[];
448
472
  imgUrl?: string;
449
473
  generatedImg?: string;
474
+ section?: SectionType;
450
475
  }
451
476
  declare class ConversationMessagesDTO {
452
477
  messages?: ChatMessage[];
@@ -774,6 +799,12 @@ declare class VideoPlayerService implements OnDestroy {
774
799
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<VideoPlayerService>;
775
800
  }
776
801
 
802
+ declare class ConversationRuleService extends EntityCommunicationService<IConversationRule> {
803
+ constructor();
804
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRuleService, never>;
805
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConversationRuleService>;
806
+ }
807
+
777
808
  type EvaluationLevel = 1 | 2 | 3 | 4 | 5;
778
809
  type CommunicationLevel = 'Beginner' | 'Intermediate' | 'Advanced' | 'Native-like';
779
810
  type DominantRegister = 'formal' | 'informal' | 'mixed';
@@ -928,6 +959,7 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
928
959
  textEngine: _angular_forms.FormControl<TextEngines>;
929
960
  conversationType: _angular_forms.FormControl<ConversationType$1>;
930
961
  autoStart: _angular_forms.FormControl<boolean>;
962
+ userMustStart: _angular_forms.FormControl<boolean>;
931
963
  mainVoice: FormGroup<any>;
932
964
  secondaryVoice: FormGroup<any>;
933
965
  model: FormGroup<{
@@ -936,6 +968,7 @@ declare class DCAgentCardFormComponent extends EntityBaseFormComponent<IAgentCar
936
968
  provider: _angular_forms.FormControl<string>;
937
969
  id: _angular_forms.FormControl<string>;
938
970
  }>;
971
+ rules: FormArray<_angular_forms.FormControl<unknown>>;
939
972
  }>;
940
973
  metaApp: FormGroup<any>;
941
974
  accounts: FormArray<_angular_forms.FormControl<unknown>>;
@@ -1287,7 +1320,29 @@ declare class ACCDataGenerationComponent {
1287
1320
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ACCDataGenerationComponent, "dc-acc-data-generation", never, { "agentCard": { "alias": "agentCard"; "required": false; }; }, { "cardImprovementsChange": "cardImprovementsChange"; }, never, never, true, never>;
1288
1321
  }
1289
1322
 
1323
+ declare class ConversationRulesComponent {
1324
+ static routes: _angular_router.Routes;
1325
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConversationRulesComponent, never>;
1326
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConversationRulesComponent, "app-conversationRules", never, {}, {}, never, never, true, never>;
1327
+ }
1328
+
1329
+ declare class PromptPreviewComponent implements OnInit {
1330
+ private promptBuilder;
1331
+ messages: _angular_core.InputSignal<ChatMessage[]>;
1332
+ jailBrake: _angular_core.InputSignal<string>;
1333
+ protected readonly SectionType: typeof SectionType;
1334
+ protected readonly formatCamelCaseString: typeof formatCamelCaseString;
1335
+ protected sectionsOrder: SectionType[];
1336
+ protected getMessagesBySection(section: SectionType): ChatMessage[];
1337
+ protected get messagesWithNoSection(): ChatMessage[];
1338
+ estimateTokens(text: string): number;
1339
+ get totalTokens(): number;
1340
+ ngOnInit(): void;
1341
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PromptPreviewComponent, never>;
1342
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PromptPreviewComponent, "dc-prompt-preview", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "jailBrake": { "alias": "jailBrake"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1343
+ }
1344
+
1290
1345
  declare const AGENT_CARDS_STATE_SERVICE: InjectionToken<MasterStateService<IAgentCard>>;
1291
1346
 
1292
- export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardDetailsComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PopupService, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1293
- export type { Appearance, AudioGenerated, AudioState, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, ICharacterCardDC, IConversationFlow, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IMoodState, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
1347
+ export { ACCDataGenerationComponent, AGENT_CARDS_STATE_SERVICE, AIGenerationService, AgentCardListComponent, AgentCardUI, AgentCardsGenerationService, AudioService, AudioSpeed, BACKGROUND_SERVICE_TOKEN, CONVERSATION_AI_TOKEN, CardsCreatorComponent, ChatEventType, ChatMessage, ChatMessageOrchestratorComponent, ChatMonitorService, ChatRole, ConditionOperator, ConditionType, ContextEngineService, ContextType, ConversationDTO, ConversationEvents, ConversationMessagesDTO, ConversationPromptBuilderService, ConversationRuleService, ConversationRulesComponent, ConversationType$1 as ConversationType, ConversationTypeOptions, DCAgentCardFormComponent, DCChatComponent, DCConversationUserChatSettingsComponent, DcAgentCardDetailsComponent, DefaultAgentCardsService, DoActionTypeOptions, DynamicFlowService, DynamicFlowTaskTypeOptions, EAccountsPlatform, EAgentType, EDoActionType, EDynamicFlowTaskType, EntityThen, EntityWhatOptions, EntityWhenOptions, EvalResultStringDefinition, GlobalToolsService, MessageContent, MessageContentDisplayer, MessagesStateService, ModelSelectorComponent, PopupService, PromptPreviewComponent, SectionType, SystemPromptType, TextEngineOptions, TextEngines, VIDEO_PLAYER_SERVICE_TOKEN, VideoPlayerService, VoiceTTSOption, VoiceTTSOptions, WordTimestamps, buildObjectTTSRequest, characterCardStringDataDefinition, convertToHTML, createAIModelFormGroup, defaultconvUserSettings, extractAudioAndTranscription, extractJsonFromResponse, getMoodStateLabelsAsString, getMoodStatePrompt, markdownToHtml, matchTranscription, provideAgentCardService, removeEmojis, removeEmojisAndSpecialCharacters, removeSpecialCharacters };
1348
+ export type { Appearance, AudioGenerated, AudioState, BackgroundTask, CardTranslation, ChangePromptAction, CharacterCardData, ChatEvent, ConversationFlowFormGroup, ConversationSettingsFormGroup, DoAction, DoActionFormGroup, DynamicConditionFormGroup, DynamicCriteriaFormGroup, IAccounts, IAgentAssets, IAgentCard, IAgentCardMeta, IAgentMetadata, IAgentResponseDTO, IBackgroundService, ICharacterCardDC, IConversationFlow, IConversationSettings, IConversationSettingsDTO, IDynamicCondition, IDynamicCriteria, IDynamicFlowTask, IGenerateConversationCardsDto, IMoodState, IRule, ISimpleAgent, ITTS, IVideoPlayerService, IWordMetadata, ModelFormGroup, ModelName, MultiLanguage, Persona, SimpleAgentTask, SimpleAgentTaskFormGroup, SimpleEvalResult, TextHTMLTag, TranscriptionsWhisper, TriggerTasksFormGroup, VoiceCloning, VoiceTTS, WordData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",