@sinequa/assistant 3.7.1 → 3.7.2

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,7 +1,7 @@
1
1
  import { EventEmitter, OnChanges, SimpleChanges, ChangeDetectorRef, AfterViewInit, ElementRef } from "@angular/core";
2
2
  import { PrincipalWebService } from "@sinequa/core/web-services";
3
3
  import { SearchService } from "@sinequa/components/search";
4
- import { ChatContextAttachment, ChatMessage, ChatStarter, SuggestedAction } from "../types";
4
+ import { ChatContextAttachment, ChatMessage, SuggestedAction } from "../types";
5
5
  import { Processor } from "unified";
6
6
  import { Node } from "unist";
7
7
  import { UIService } from "@sinequa/components/utils";
@@ -17,7 +17,6 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
17
17
  message: ChatMessage;
18
18
  conversation: ChatMessage[];
19
19
  suggestedActions: SuggestedAction[] | undefined;
20
- chatStarters: ChatStarter[] | undefined;
21
20
  assistantMessageIcon: string;
22
21
  userMessageIcon: string;
23
22
  connectionErrorMessageIcon: string;
@@ -38,12 +37,11 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
38
37
  partId?: number | undefined;
39
38
  }>;
40
39
  suggestAction: EventEmitter<SuggestedAction>;
41
- chatStarterClicked: EventEmitter<ChatStarter>;
42
40
  edit: EventEmitter<ChatMessage>;
43
41
  copy: EventEmitter<ChatMessage>;
44
42
  regenerate: EventEmitter<ChatMessage>;
45
- like: EventEmitter<ChatMessage>;
46
- dislike: EventEmitter<ChatMessage>;
43
+ like: EventEmitter<any>;
44
+ dislike: EventEmitter<any>;
47
45
  debug: EventEmitter<ChatMessage>;
48
46
  processor: Processor;
49
47
  references: string[];
@@ -51,8 +49,6 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
51
49
  showReferences: boolean;
52
50
  collapseProgress: boolean;
53
51
  iconSize: number;
54
- liked: boolean;
55
- disliked: boolean;
56
52
  hiddenTooltip: boolean;
57
53
  constructor(searchService: SearchService, ui: UIService, principalService: PrincipalWebService, cdr: ChangeDetectorRef, el: ElementRef);
58
54
  ngOnChanges(changes: SimpleChanges): void;
@@ -81,5 +77,5 @@ export declare class ChatMessageComponent implements OnChanges, AfterViewInit {
81
77
  openOriginalAttachment(attachment: ChatContextAttachment, partId?: number): void;
82
78
  hideTooltip(): void;
83
79
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
84
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "sq-chat-message", never, { "message": "message"; "conversation": "conversation"; "suggestedActions": "suggestedActions"; "chatStarters": "chatStarters"; "assistantMessageIcon": "assistantMessageIcon"; "userMessageIcon": "userMessageIcon"; "connectionErrorMessageIcon": "connectionErrorMessageIcon"; "searchWarningMessageIcon": "searchWarningMessageIcon"; "streaming": "streaming"; "canEdit": "canEdit"; "canRegenerate": "canRegenerate"; "canCopy": "canCopy"; "canDebug": "canDebug"; "canLike": "canLike"; "canDislike": "canDislike"; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; "chatStarterClicked": "chatStarterClicked"; "edit": "edit"; "copy": "copy"; "regenerate": "regenerate"; "like": "like"; "dislike": "dislike"; "debug": "debug"; }, never, never, true>;
80
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "sq-chat-message", never, { "message": "message"; "conversation": "conversation"; "suggestedActions": "suggestedActions"; "assistantMessageIcon": "assistantMessageIcon"; "userMessageIcon": "userMessageIcon"; "connectionErrorMessageIcon": "connectionErrorMessageIcon"; "searchWarningMessageIcon": "searchWarningMessageIcon"; "streaming": "streaming"; "canEdit": "canEdit"; "canRegenerate": "canRegenerate"; "canCopy": "canCopy"; "canDebug": "canDebug"; "canLike": "canLike"; "canDislike": "canDislike"; }, { "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; "edit": "edit"; "copy": "copy"; "regenerate": "regenerate"; "like": "like"; "dislike": "dislike"; "debug": "debug"; }, never, never, true>;
85
81
  }
@@ -6,12 +6,13 @@ import { AppService, Query } from "@sinequa/core/app-utils";
6
6
  import { PrincipalWebService } from "@sinequa/core/web-services";
7
7
  import { BehaviorSubject } from "rxjs";
8
8
  import { ChatService } from "./chat.service";
9
- import { ChatContextAttachment, ChatConfig, ChatMessage, GllmModelDescription, MessageHandler, RawMessage, SuggestedAction, InitChat, DebugMessage, ChatStarter } from "./types";
9
+ import { ChatContextAttachment, ChatConfig, ChatMessage, GllmModelDescription, MessageHandler, RawMessage, SuggestedAction, InitChat, DebugMessage } from "./types";
10
10
  import { InstanceManagerService } from "./instance-manager.service";
11
11
  import { WebSocketChatService } from "./websocket-chat.service";
12
12
  import { LoginService } from "@sinequa/core/login";
13
13
  import { RestChatService } from "./rest-chat.service";
14
14
  import { HubConnection } from "@microsoft/signalr";
15
+ import { NotificationsService } from "@sinequa/core/notification";
15
16
  import * as i0 from "@angular/core";
16
17
  export declare class ChatComponent extends AbstractFacet implements OnInit, OnChanges, OnDestroy {
17
18
  loginService: LoginService;
@@ -928,6 +929,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
928
929
  principalService: PrincipalWebService;
929
930
  cdr: ChangeDetectorRef;
930
931
  appService: AppService;
932
+ notificationsService: NotificationsService;
931
933
  /** Define the key based on it, the chat service instance will be stored */
932
934
  instanceId: string;
933
935
  /** Define the query to use to fetch answers */
@@ -1075,8 +1077,6 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1075
1077
  openPreview: EventEmitter<ChatContextAttachment>;
1076
1078
  /** Event emitter triggered when the user clicks on a suggested action */
1077
1079
  suggestAction: EventEmitter<SuggestedAction>;
1078
- /** Event emitter triggered when the user clicks on a chat starter */
1079
- chatStarter: EventEmitter<ChatStarter>;
1080
1080
  /** ViewChild decorators to access the template elements */
1081
1081
  messageList?: ElementRef<HTMLUListElement>;
1082
1082
  questionInput?: ElementRef<HTMLTextAreaElement>;
@@ -1123,7 +1123,6 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1123
1123
  ngOnChanges(changes: SimpleChanges): void;
1124
1124
  ngOnDestroy(): void;
1125
1125
  get isAdmin(): boolean;
1126
- get visibleMessagesCount(): number;
1127
1126
  /**
1128
1127
  * Instantiate the chat service based on the provided @input protocol
1129
1128
  * This chat service instance will then be stored in the instanceManagerService with provided @input instanceId as a key
@@ -1169,6 +1168,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1169
1168
  * If the user is editing a previous message, removes all subsequent messages from the chat history.
1170
1169
  * Triggers the fetch of the answer for the submitted question by calling _fetchAnswer().
1171
1170
  * Clears the input value in the UI.
1171
+ * ⚠️ If the chat is streaming or stopping the generation, the operation is not allowed.
1172
1172
  */
1173
1173
  submitQuestion(): void;
1174
1174
  /**
@@ -1183,6 +1183,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1183
1183
  * Depending on the connection's state :
1184
1184
  * - If connected => given a list of messages, the chat endpoint is invoked for a continuation and updates the list of messages accordingly.
1185
1185
  * - If any other state => a connection error message is displayed in the chat.
1186
+ * ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
1186
1187
  * @param messages The list of messages to invoke the chat endpoint with
1187
1188
  */
1188
1189
  fetch(messages: ChatMessage[]): void;
@@ -1213,16 +1214,17 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1213
1214
  */
1214
1215
  scrollDown(): void;
1215
1216
  /**
1216
- * Start a new chat with the defaultValues settings
1217
- * The savedChatId in the chat service will be reset, so that the upcoming saved chat operations will be performed on the fresh new chat
1218
- * If the savedChat feature is enabled, the list of saved chats will be refreshed
1217
+ * Start a new chat with the defaultValues settings.
1218
+ * The savedChatId in the chat service will be reset, so that the upcoming saved chat operations will be performed on the fresh new chat.
1219
+ * If the savedChat feature is enabled, the list of saved chats will be refreshed.
1220
+ * ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
1219
1221
  */
1220
1222
  newChat(): void;
1221
1223
  /**
1222
1224
  * Attaches the specified document IDs to the assistant.
1223
- * If the chat is streaming or stopping the generation, the operation is not allowed.
1224
1225
  * If no document IDs are provided, the operation is not allowed.
1225
1226
  * If the action for attaching a document is not defined at the application customization level, an error is logged.
1227
+ * ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
1226
1228
  * @param ids - An array of document IDs to attach.
1227
1229
  */
1228
1230
  attachToChat(ids: string[]): void;
@@ -1232,8 +1234,22 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1232
1234
  */
1233
1235
  loadDefaultChat(): void;
1234
1236
  /**
1237
+ * Handles the prompt mode of the chat component.
1238
+ * If `sendUserPrompt` is true, it opens the chat with both system and user messages,
1239
+ * and generates audit events for both messages.
1240
+ * If `sendUserPrompt` is false, it opens the chat with only the system message,
1241
+ * and generates an audit event for the system message.
1242
+ *
1243
+ * @param systemMsg - The system message to be displayed in the chat.
1244
+ * @param userMsg - The user message to be displayed in the chat (optional).
1245
+ */
1246
+ private _handlePromptMode;
1247
+ /**
1248
+ * Handles the query mode by displaying the system message, user message, and user query message.
1235
1249
  * If the provided query text is not empty, then add the user query message to the chat history and invoke the assistant
1236
1250
  * Otherwise, just start a new chat with a warning message inviting the user to perform a full text search to retrieve some results
1251
+ * @param systemMsg - The system message to be displayed.
1252
+ * @param userMsg - The user message to be displayed.
1237
1253
  */
1238
1254
  private _handleQueryMode;
1239
1255
  private _defineMessageAuditDetails;
@@ -1271,6 +1287,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1271
1287
  * Thus, the user can edit and resubmit the message.
1272
1288
  * Once the edited message is submitted, all subsequent messages starting from @param index will be removed from the history and the UI will be updated accordingly.
1273
1289
  * The assistant will regenerate a new answer based on the updated chat history.
1290
+ * ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
1274
1291
  * @param index The index of the user's message to edit
1275
1292
  */
1276
1293
  editMessage(index: number): void;
@@ -1282,6 +1299,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1282
1299
  /**
1283
1300
  * Starting from the provided index, remove all subsequent messages from the chat history and the UI accordingly.
1284
1301
  * The assistant will regenerate a new answer based on the updated chat history.
1302
+ * ⚠️ If the assistant is streaming or stopping the generation, the operation is not allowed.
1285
1303
  * @param index The index of the assistant's message to regenerate
1286
1304
  */
1287
1305
  regenerateMessage(index: number): void;
@@ -1317,6 +1335,7 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1317
1335
  * @param index The rank of the message to dislike
1318
1336
  */
1319
1337
  onDislike(message: ChatMessage, rank: number): void;
1338
+ private _updateChatHistory;
1320
1339
  /**
1321
1340
  * Report an issue related to the assistant's message.
1322
1341
  */
@@ -1347,11 +1366,6 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1347
1366
  * @param index Rank of the message in the chatHistory related to the suggested action.
1348
1367
  */
1349
1368
  suggestActionClick(action: SuggestedAction, index: number): void;
1350
- /**
1351
- * Handle the click on a chat starter.
1352
- * @param starter the chat starter.
1353
- */
1354
- chatStarterClick(starter: ChatStarter): void;
1355
1369
  /**
1356
1370
  * It looks for the debug messages available in the current group of "assistant" messages.
1357
1371
  * By design, the debug messages are only available in the first visible message among the group "assistant" messages.
@@ -1372,6 +1386,16 @@ export declare class ChatComponent extends AbstractFacet implements OnInit, OnCh
1372
1386
  * @returns if this messages and the following ones (if any) are the last ones
1373
1387
  */
1374
1388
  isAssistantLastMessages(messages: ChatMessage[], index: number): boolean;
1389
+ /**
1390
+ * Checks if the given message is an empty assistant message.
1391
+ * An empty assistant message is defined as a message with the role 'assistant',
1392
+ * an empty content, and no additional properties such as attachments, progress,
1393
+ * debug information, or suggested actions.
1394
+ *
1395
+ * @param message - The message to check.
1396
+ * @returns `true` if the message is an empty assistant message, `false` otherwise.
1397
+ */
1398
+ isEmptyAssistantMessage(message: ChatMessage | undefined): boolean;
1375
1399
  static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
1376
- static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "sq-chat-v3", never, { "instanceId": "instanceId"; "query": "query"; "queryChangeShouldTriggerReload": "queryChangeShouldTriggerReload"; "protocol": "protocol"; "messageHandlers": "messageHandlers"; "automaticScrollToLastResponse": "automaticScrollToLastResponse"; "focusAfterResponse": "focusAfterResponse"; "chat": "chat"; "assistantMessageIcon": "assistantMessageIcon"; "userMessageIcon": "userMessageIcon"; "connectionErrorMessageIcon": "connectionErrorMessageIcon"; "searchWarningMessageIcon": "searchWarningMessageIcon"; }, { "connection": "connection"; "loading$": "loading"; "_config": "config"; "data": "data"; "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; "chatStarter": "chatStarter"; }, ["loadingTpl", "reportTpl", "tokenConsumptionTpl", "debugMessagesTpl"], never, true>;
1400
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "sq-chat-v3", never, { "instanceId": "instanceId"; "query": "query"; "queryChangeShouldTriggerReload": "queryChangeShouldTriggerReload"; "protocol": "protocol"; "messageHandlers": "messageHandlers"; "automaticScrollToLastResponse": "automaticScrollToLastResponse"; "focusAfterResponse": "focusAfterResponse"; "chat": "chat"; "assistantMessageIcon": "assistantMessageIcon"; "userMessageIcon": "userMessageIcon"; "connectionErrorMessageIcon": "connectionErrorMessageIcon"; "searchWarningMessageIcon": "searchWarningMessageIcon"; }, { "connection": "connection"; "loading$": "loading"; "_config": "config"; "data": "data"; "openDocument": "openDocument"; "openPreview": "openPreview"; "suggestAction": "suggestAction"; }, ["loadingTpl", "reportTpl", "tokenConsumptionTpl", "debugMessagesTpl"], never, true>;
1377
1401
  }
@@ -11,14 +11,16 @@ import * as i0 from "@angular/core";
11
11
  export declare abstract class ChatService {
12
12
  /** Name of the assistant plugin OR websocket endpoint. */
13
13
  REQUEST_URL: string;
14
- /** Emit true once the initialization of the chat process is done. */
14
+ /** Emit true once the initialization of the assistant process is done. */
15
15
  initProcess$: BehaviorSubject<boolean>;
16
- /** Emit true once the initialization of the chat config is done. */
16
+ /** Emit true once the initialization of the assistant config is done. */
17
17
  initConfig$: BehaviorSubject<boolean>;
18
- /** Global configuration of the chat. */
19
- chatConfig$: BehaviorSubject<ChatConfig | undefined>;
18
+ /** Emit the global configuration of the assistant. */
19
+ assistantConfig$: BehaviorSubject<ChatConfig | undefined>;
20
+ /** Emit true if the user has been overridden, false otherwise. */
21
+ userOverride$: BehaviorSubject<boolean | undefined>;
20
22
  /**
21
- * Emit true if the fetch of an assistant's response is ongoing (it includes Streaming status of the chat endpoint AND saving the discussion if save Chat is enabled).
23
+ * Emit true if the fetch of an assistant's response is ongoing (it includes Streaming status of the assistant endpoint AND saving the discussion if save Chat is enabled).
22
24
  * This is used to prevent multiple fetches at the same time.
23
25
  * Typically, there is no problem chaining fetches, but when forcing a reload after query changes cases, it can't be allowed because it breaks the whole business logic.
24
26
  */
@@ -120,6 +122,10 @@ export declare abstract class ChatService {
120
122
  "applied-defaultValues-hash"?: string;
121
123
  "skipped-defaultValues-hash"?: string;
122
124
  }, notify?: boolean, successCallback?: () => any, errorCallback?: () => any): void;
125
+ /**
126
+ * Overrides the logged in user
127
+ */
128
+ abstract overrideUser(): void;
123
129
  /**
124
130
  * Calls the Fetch API to retrieve a new message given all previous messages
125
131
  */
@@ -18,6 +18,7 @@ export declare class RestChatService extends ChatService {
18
18
  * It can be overridden by the app config
19
19
  */
20
20
  getRequestsUrl(): void;
21
+ overrideUser(): void;
21
22
  listModels(): Observable<GllmModelDescription[] | undefined>;
22
23
  listFunctions(): Observable<GllmFunction[] | undefined>;
23
24
  fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;
@@ -35,6 +35,7 @@ $ast-input-color: var(--ast-input-color, #B0B0B0);
35
35
  $ast-muted-color: var(--ast-muted-color, rgba(33, 37, 41, 0.75));
36
36
  $ast-action-buttons-color: var(--ast-action-buttons-color, #212529);
37
37
  $ast-action-buttons-hover-color: var(--ast-action-buttons-hover-color, var(--ast-primary-color, #005DA7));
38
+ $ast-report-bg: var(--ast-report-bg, white);
38
39
 
39
40
  /****************************************************
40
41
  classes
@@ -95,4 +96,5 @@ $ast-action-buttons-hover-color: var(--ast-action-buttons-hover-color, var(--ast
95
96
  --ast-message-reference-color: black;
96
97
  --ast-action-buttons-color: white;
97
98
  --ast-action-buttons-hover-color: #6dbee6;
99
+ --ast-report-bg: #070707;
98
100
  }
package/chat/types.d.ts CHANGED
@@ -34,6 +34,8 @@ export interface ChatMessage extends RawMessage {
34
34
  isUserInput?: boolean;
35
35
  usageMetrics?: ChatUsageMetrics;
36
36
  additionalWorkflowProperties?: any;
37
+ $liked?: boolean;
38
+ $disliked?: boolean;
37
39
  [key: string]: any;
38
40
  };
39
41
  }
@@ -266,16 +268,7 @@ declare const defaultValuesSchema: z.ZodObject<{
266
268
  }>;
267
269
  export interface DefaultValues extends z.infer<typeof defaultValuesSchema> {
268
270
  }
269
- declare const chatStarterSchema: z.ZodObject<{
270
- text: z.ZodString;
271
- }, "strip", z.ZodTypeAny, {
272
- text: string;
273
- }, {
274
- text: string;
275
- }>;
276
- export interface ChatStarter extends z.infer<typeof chatStarterSchema> {
277
- }
278
- declare const modeSettingsSchema: z.ZodEffects<z.ZodObject<{
271
+ declare const modeSettingsSchema: z.ZodObject<{
279
272
  enabledUserInput: z.ZodBoolean;
280
273
  displayUserPrompt: z.ZodBoolean;
281
274
  sendUserPrompt: z.ZodBoolean;
@@ -283,41 +276,22 @@ declare const modeSettingsSchema: z.ZodEffects<z.ZodObject<{
283
276
  event: z.ZodEnum<["Query", "Prompt"]>;
284
277
  forcedWorkflow: z.ZodOptional<z.ZodString>;
285
278
  displayUserQuery: z.ZodOptional<z.ZodBoolean>;
286
- chatStarters: z.ZodOptional<z.ZodArray<z.ZodObject<{
287
- text: z.ZodString;
288
- }, "strip", z.ZodTypeAny, {
289
- text: string;
290
- }, {
291
- text: string;
292
- }>, "many">>;
293
279
  }, "strip", z.ZodTypeAny, {
294
280
  event: "Query" | "Prompt";
295
281
  forcedWorkflow?: string | undefined;
296
282
  displayUserQuery?: boolean | undefined;
297
- chatStarters?: {
298
- text: string;
299
- }[] | undefined;
300
283
  }, {
301
284
  event: "Query" | "Prompt";
302
285
  forcedWorkflow?: string | undefined;
303
286
  displayUserQuery?: boolean | undefined;
304
- chatStarters?: {
305
- text: string;
306
- }[] | undefined;
307
287
  }>, {
308
288
  event: "Query" | "Prompt";
309
289
  forcedWorkflow?: string | undefined;
310
290
  displayUserQuery?: boolean | undefined;
311
- chatStarters?: {
312
- text: string;
313
- }[] | undefined;
314
291
  }, {
315
292
  event: "Query" | "Prompt";
316
293
  forcedWorkflow?: string | undefined;
317
294
  displayUserQuery?: boolean | undefined;
318
- chatStarters?: {
319
- text: string;
320
- }[] | undefined;
321
295
  }>;
322
296
  actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
323
297
  forcedWorkflow: z.ZodString;
@@ -337,41 +311,6 @@ declare const modeSettingsSchema: z.ZodEffects<z.ZodObject<{
337
311
  event: "Query" | "Prompt";
338
312
  forcedWorkflow?: string | undefined;
339
313
  displayUserQuery?: boolean | undefined;
340
- chatStarters?: {
341
- text: string;
342
- }[] | undefined;
343
- };
344
- actions?: globalThis.Record<string, {
345
- forcedWorkflow: string;
346
- forcedWorkflowProperties?: globalThis.Record<string, unknown> | undefined;
347
- }> | undefined;
348
- }, {
349
- displayUserPrompt: boolean;
350
- enabledUserInput: boolean;
351
- sendUserPrompt: boolean;
352
- initialization: {
353
- event: "Query" | "Prompt";
354
- forcedWorkflow?: string | undefined;
355
- displayUserQuery?: boolean | undefined;
356
- chatStarters?: {
357
- text: string;
358
- }[] | undefined;
359
- };
360
- actions?: globalThis.Record<string, {
361
- forcedWorkflow: string;
362
- forcedWorkflowProperties?: globalThis.Record<string, unknown> | undefined;
363
- }> | undefined;
364
- }>, {
365
- displayUserPrompt: boolean;
366
- enabledUserInput: boolean;
367
- sendUserPrompt: boolean;
368
- initialization: {
369
- event: "Query" | "Prompt";
370
- forcedWorkflow?: string | undefined;
371
- displayUserQuery?: boolean | undefined;
372
- chatStarters?: {
373
- text: string;
374
- }[] | undefined;
375
314
  };
376
315
  actions?: globalThis.Record<string, {
377
316
  forcedWorkflow: string;
@@ -385,9 +324,6 @@ declare const modeSettingsSchema: z.ZodEffects<z.ZodObject<{
385
324
  event: "Query" | "Prompt";
386
325
  forcedWorkflow?: string | undefined;
387
326
  displayUserQuery?: boolean | undefined;
388
- chatStarters?: {
389
- text: string;
390
- }[] | undefined;
391
327
  };
392
328
  actions?: globalThis.Record<string, {
393
329
  forcedWorkflow: string;
@@ -493,7 +429,7 @@ export declare const chatConfigSchema: z.ZodObject<{
493
429
  systemPrompt: string;
494
430
  userPrompt: string;
495
431
  }>;
496
- modeSettings: z.ZodEffects<z.ZodObject<{
432
+ modeSettings: z.ZodObject<{
497
433
  enabledUserInput: z.ZodBoolean;
498
434
  displayUserPrompt: z.ZodBoolean;
499
435
  sendUserPrompt: z.ZodBoolean;
@@ -501,41 +437,22 @@ export declare const chatConfigSchema: z.ZodObject<{
501
437
  event: z.ZodEnum<["Query", "Prompt"]>;
502
438
  forcedWorkflow: z.ZodOptional<z.ZodString>;
503
439
  displayUserQuery: z.ZodOptional<z.ZodBoolean>;
504
- chatStarters: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
- text: z.ZodString;
506
- }, "strip", z.ZodTypeAny, {
507
- text: string;
508
- }, {
509
- text: string;
510
- }>, "many">>;
511
440
  }, "strip", z.ZodTypeAny, {
512
441
  event: "Query" | "Prompt";
513
442
  forcedWorkflow?: string | undefined;
514
443
  displayUserQuery?: boolean | undefined;
515
- chatStarters?: {
516
- text: string;
517
- }[] | undefined;
518
444
  }, {
519
445
  event: "Query" | "Prompt";
520
446
  forcedWorkflow?: string | undefined;
521
447
  displayUserQuery?: boolean | undefined;
522
- chatStarters?: {
523
- text: string;
524
- }[] | undefined;
525
448
  }>, {
526
449
  event: "Query" | "Prompt";
527
450
  forcedWorkflow?: string | undefined;
528
451
  displayUserQuery?: boolean | undefined;
529
- chatStarters?: {
530
- text: string;
531
- }[] | undefined;
532
452
  }, {
533
453
  event: "Query" | "Prompt";
534
454
  forcedWorkflow?: string | undefined;
535
455
  displayUserQuery?: boolean | undefined;
536
- chatStarters?: {
537
- text: string;
538
- }[] | undefined;
539
456
  }>;
540
457
  actions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
541
458
  forcedWorkflow: z.ZodString;
@@ -555,41 +472,6 @@ export declare const chatConfigSchema: z.ZodObject<{
555
472
  event: "Query" | "Prompt";
556
473
  forcedWorkflow?: string | undefined;
557
474
  displayUserQuery?: boolean | undefined;
558
- chatStarters?: {
559
- text: string;
560
- }[] | undefined;
561
- };
562
- actions?: globalThis.Record<string, {
563
- forcedWorkflow: string;
564
- forcedWorkflowProperties?: globalThis.Record<string, unknown> | undefined;
565
- }> | undefined;
566
- }, {
567
- displayUserPrompt: boolean;
568
- enabledUserInput: boolean;
569
- sendUserPrompt: boolean;
570
- initialization: {
571
- event: "Query" | "Prompt";
572
- forcedWorkflow?: string | undefined;
573
- displayUserQuery?: boolean | undefined;
574
- chatStarters?: {
575
- text: string;
576
- }[] | undefined;
577
- };
578
- actions?: globalThis.Record<string, {
579
- forcedWorkflow: string;
580
- forcedWorkflowProperties?: globalThis.Record<string, unknown> | undefined;
581
- }> | undefined;
582
- }>, {
583
- displayUserPrompt: boolean;
584
- enabledUserInput: boolean;
585
- sendUserPrompt: boolean;
586
- initialization: {
587
- event: "Query" | "Prompt";
588
- forcedWorkflow?: string | undefined;
589
- displayUserQuery?: boolean | undefined;
590
- chatStarters?: {
591
- text: string;
592
- }[] | undefined;
593
475
  };
594
476
  actions?: globalThis.Record<string, {
595
477
  forcedWorkflow: string;
@@ -603,9 +485,6 @@ export declare const chatConfigSchema: z.ZodObject<{
603
485
  event: "Query" | "Prompt";
604
486
  forcedWorkflow?: string | undefined;
605
487
  displayUserQuery?: boolean | undefined;
606
- chatStarters?: {
607
- text: string;
608
- }[] | undefined;
609
488
  };
610
489
  actions?: globalThis.Record<string, {
611
490
  forcedWorkflow: string;
@@ -713,9 +592,6 @@ export declare const chatConfigSchema: z.ZodObject<{
713
592
  event: "Query" | "Prompt";
714
593
  forcedWorkflow?: string | undefined;
715
594
  displayUserQuery?: boolean | undefined;
716
- chatStarters?: {
717
- text: string;
718
- }[] | undefined;
719
595
  };
720
596
  actions?: globalThis.Record<string, {
721
597
  forcedWorkflow: string;
@@ -780,9 +656,6 @@ export declare const chatConfigSchema: z.ZodObject<{
780
656
  event: "Query" | "Prompt";
781
657
  forcedWorkflow?: string | undefined;
782
658
  displayUserQuery?: boolean | undefined;
783
- chatStarters?: {
784
- text: string;
785
- }[] | undefined;
786
659
  };
787
660
  actions?: globalThis.Record<string, {
788
661
  forcedWorkflow: string;
@@ -19,8 +19,9 @@ export declare class WebSocketChatService extends ChatService {
19
19
  authenticationService: AuthenticationService;
20
20
  constructor();
21
21
  /**
22
- * Initialize the chat process after the login is complete.
22
+ * Initialize the assistant process.
23
23
  * It includes building and starting a connection, executing parallel requests for models and functions, and handling errors during the process.
24
+ * ⚠️ This method MUST be called ONLY if the user is loggedIn and once when the assistant is initialized.
24
25
  *
25
26
  * @returns An Observable<boolean> indicating the success of the initialization process.
26
27
  */
@@ -30,6 +31,7 @@ export declare class WebSocketChatService extends ChatService {
30
31
  * It can be overridden by the app config
31
32
  */
32
33
  getRequestsUrl(): void;
34
+ overrideUser(): void;
33
35
  listModels(): Observable<GllmModelDescription[] | undefined>;
34
36
  listFunctions(): Observable<GllmFunction[] | undefined>;
35
37
  fetch(messages: ChatMessage[], query: Query): Observable<ChatResponse>;