@sinequa/assistant 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat/charts/chart/chart.component.d.ts +13 -13
- package/chat/chat-message/chat-message.component.d.ts +85 -81
- package/chat/chat-message/i18n/en.json +11 -0
- package/chat/chat-message/i18n/fr.json +11 -0
- package/chat/chat-reference/chat-reference.component.d.ts +14 -14
- package/chat/chat-reference/i18n/en.json +4 -0
- package/chat/chat-reference/i18n/fr.json +4 -0
- package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +48 -50
- package/chat/chat-settings-v3/i18n/en.json +14 -0
- package/chat/chat-settings-v3/i18n/fr.json +14 -0
- package/chat/chat.component.d.ts +388 -1405
- package/chat/chat.service.d.ts +247 -228
- package/chat/debug-message/debug-message.component.d.ts +17 -17
- package/chat/debug-message/i18n/en.json +3 -0
- package/chat/debug-message/i18n/fr.json +3 -0
- package/chat/dialogs/delete-saved-chat.component.d.ts +22 -0
- package/chat/dialogs/i18n/en.json +19 -0
- package/chat/dialogs/i18n/fr.json +19 -0
- package/chat/dialogs/rename-saved-chat.component.d.ts +21 -0
- package/chat/dialogs/updates.component.d.ts +15 -0
- package/chat/documents-upload/document-list/document-list.component.d.ts +68 -77
- package/chat/documents-upload/document-overview/document-overview.component.d.ts +31 -41
- package/chat/documents-upload/document-upload/document-upload.component.d.ts +96 -98
- package/chat/documents-upload/documents-upload.model.d.ts +66 -66
- package/chat/documents-upload/documents-upload.service.d.ts +170 -174
- package/chat/documents-upload/i18n/en.json +24 -0
- package/chat/documents-upload/i18n/fr.json +24 -0
- package/chat/format-icon/format-icon.component.d.ts +10 -10
- package/chat/format-icon/icons.d.ts +5 -5
- package/chat/i18n/en.json +42 -0
- package/chat/i18n/fr.json +42 -0
- package/chat/index.d.ts +5 -5
- package/chat/initials-avatar/initials-avatar.component.d.ts +35 -35
- package/chat/instance-manager.service.d.ts +28 -28
- package/chat/pipes/message-content.pipe.d.ts +16 -0
- package/chat/prompt.component.d.ts +25 -21
- package/chat/public-api.d.ts +17 -17
- package/chat/references/i18n/en.json +6 -0
- package/chat/references/i18n/fr.json +6 -0
- package/chat/references/inline-image-reference.d.ts +21 -0
- package/chat/references/inline-page-reference.d.ts +21 -0
- package/chat/rest-chat.service.d.ts +31 -33
- package/chat/saved-chats/i18n/en.json +4 -0
- package/chat/saved-chats/i18n/fr.json +4 -0
- package/chat/saved-chats/saved-chats.component.d.ts +30 -36
- package/chat/services/app.service.d.ts +8 -0
- package/chat/services/dialog.service.d.ts +12 -0
- package/chat/services/notification.service.d.ts +10 -0
- package/chat/services/principal.service.d.ts +7 -0
- package/chat/services/search.service.d.ts +7 -0
- package/chat/services/signalR.web.service.d.ts +45 -0
- package/chat/services/ui.service.d.ts +13 -0
- package/chat/services/user-settings.service.d.ts +7 -0
- package/chat/token-progress-bar/i18n/en.json +4 -0
- package/chat/token-progress-bar/i18n/fr.json +4 -0
- package/chat/token-progress-bar/token-progress-bar.component.d.ts +24 -27
- package/chat/tooltip/tooltip.component.d.ts +12 -0
- package/chat/tooltip/tooltip.directive.d.ts +81 -0
- package/chat/types/message-content.types.d.ts +54 -0
- package/chat/types/message-reference.types.d.ts +11 -0
- package/chat/types.d.ts +913 -873
- package/chat/unified-plugins/embedded-image-reference.plugin.d.ts +3 -0
- package/chat/unified-plugins/embedded-page-reference.plugin.d.ts +3 -0
- package/chat/utils/assistant-json.d.ts +2 -0
- package/chat/websocket-chat.service.d.ts +102 -103
- package/esm2022/chat/charts/chart/chart.component.mjs +40 -0
- package/esm2022/chat/chat-message/chat-message.component.mjs +351 -0
- package/esm2022/chat/chat-reference/chat-reference.component.mjs +40 -0
- package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +118 -0
- package/esm2022/chat/chat.component.mjs +1090 -0
- package/esm2022/chat/chat.service.mjs +417 -0
- package/esm2022/chat/debug-message/debug-message.component.mjs +43 -0
- package/esm2022/chat/dialogs/delete-saved-chat.component.mjs +81 -0
- package/esm2022/chat/dialogs/rename-saved-chat.component.mjs +84 -0
- package/esm2022/chat/dialogs/updates.component.mjs +61 -0
- package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +140 -0
- package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +65 -0
- package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +256 -0
- package/{esm2020 → esm2022}/chat/documents-upload/documents-upload.model.mjs +1 -1
- package/esm2022/chat/documents-upload/documents-upload.service.mjs +291 -0
- package/{esm2020 → esm2022}/chat/format-icon/format-icon.component.mjs +23 -23
- package/{esm2020 → esm2022}/chat/format-icon/icons.mjs +137 -137
- package/{esm2020 → esm2022}/chat/initials-avatar/initials-avatar.component.mjs +60 -60
- package/esm2022/chat/instance-manager.service.mjs +46 -0
- package/esm2022/chat/pipes/message-content.pipe.mjs +34 -0
- package/esm2022/chat/prompt.component.mjs +88 -0
- package/{esm2020 → esm2022}/chat/public-api.mjs +18 -18
- package/esm2022/chat/references/inline-image-reference.mjs +110 -0
- package/esm2022/chat/references/inline-page-reference.mjs +110 -0
- package/esm2022/chat/rest-chat.service.mjs +296 -0
- package/esm2022/chat/saved-chats/saved-chats.component.mjs +82 -0
- package/esm2022/chat/services/app.service.mjs +19 -0
- package/esm2022/chat/services/dialog.service.mjs +40 -0
- package/esm2022/chat/services/notification.service.mjs +25 -0
- package/esm2022/chat/services/principal.service.mjs +16 -0
- package/esm2022/chat/services/search.service.mjs +13 -0
- package/esm2022/chat/services/signalR.web.service.mjs +79 -0
- package/esm2022/chat/services/ui.service.mjs +61 -0
- package/esm2022/chat/services/user-settings.service.mjs +22 -0
- package/{esm2020 → esm2022}/chat/sinequa-assistant-chat.mjs +4 -4
- package/esm2022/chat/token-progress-bar/token-progress-bar.component.mjs +52 -0
- package/esm2022/chat/tooltip/tooltip.component.mjs +44 -0
- package/esm2022/chat/tooltip/tooltip.directive.mjs +203 -0
- package/esm2022/chat/types/message-content.types.mjs +2 -0
- package/esm2022/chat/types/message-reference.types.mjs +2 -0
- package/esm2022/chat/types.mjs +130 -0
- package/esm2022/chat/unified-plugins/embedded-image-reference.plugin.mjs +57 -0
- package/esm2022/chat/unified-plugins/embedded-page-reference.plugin.mjs +57 -0
- package/esm2022/chat/utils/assistant-json.mjs +12 -0
- package/esm2022/chat/websocket-chat.service.mjs +654 -0
- package/{esm2020 → esm2022}/public-api.mjs +2 -2
- package/{esm2020 → esm2022}/sinequa-assistant.mjs +4 -4
- package/fesm2022/sinequa-assistant-chat.mjs +5340 -0
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/sinequa-assistant.mjs +3 -3
- package/index.d.ts +5 -5
- package/package.json +52 -25
- package/public-api.d.ts +1 -1
- package/chat/messages/de.d.ts +0 -4
- package/chat/messages/en.d.ts +0 -4
- package/chat/messages/fr.d.ts +0 -4
- package/chat/messages/index.d.ts +0 -4
- package/esm2020/chat/charts/chart/chart.component.mjs +0 -40
- package/esm2020/chat/chat-message/chat-message.component.mjs +0 -263
- package/esm2020/chat/chat-reference/chat-reference.component.mjs +0 -40
- package/esm2020/chat/chat-settings-v3/chat-settings-v3.component.mjs +0 -117
- package/esm2020/chat/chat.component.mjs +0 -1069
- package/esm2020/chat/chat.service.mjs +0 -333
- package/esm2020/chat/debug-message/debug-message.component.mjs +0 -43
- package/esm2020/chat/documents-upload/document-list/document-list.component.mjs +0 -191
- package/esm2020/chat/documents-upload/document-overview/document-overview.component.mjs +0 -80
- package/esm2020/chat/documents-upload/document-upload/document-upload.component.mjs +0 -258
- package/esm2020/chat/documents-upload/documents-upload.service.mjs +0 -289
- package/esm2020/chat/instance-manager.service.mjs +0 -46
- package/esm2020/chat/messages/de.mjs +0 -4
- package/esm2020/chat/messages/en.mjs +0 -4
- package/esm2020/chat/messages/fr.mjs +0 -4
- package/esm2020/chat/messages/index.mjs +0 -9
- package/esm2020/chat/prompt.component.mjs +0 -88
- package/esm2020/chat/rest-chat.service.mjs +0 -241
- package/esm2020/chat/saved-chats/saved-chats.component.mjs +0 -175
- package/esm2020/chat/token-progress-bar/token-progress-bar.component.mjs +0 -54
- package/esm2020/chat/types.mjs +0 -112
- package/esm2020/chat/websocket-chat.service.mjs +0 -641
- package/fesm2015/sinequa-assistant-chat.mjs +0 -4200
- package/fesm2015/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant-chat.mjs +0 -4171
- package/fesm2020/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant.mjs +0 -9
- package/fesm2020/sinequa-assistant.mjs.map +0 -1
- /package/{fesm2015 → fesm2022}/sinequa-assistant.mjs.map +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, TemplateRef } from "@angular/core";
|
|
2
|
+
import { ConnectedPosition, Overlay, OverlayPositionBuilder } from "@angular/cdk/overlay";
|
|
3
|
+
import { Observable } from "rxjs";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type Placement = "top" | "bottom" | "right" | "left";
|
|
6
|
+
/**
|
|
7
|
+
* Directive that attaches a tooltip to the host element
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <div sqTooltip="This is a tooltip's text"></div>
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // A template can be passed to the directive instead of a string. Here 'tooltip' is a template reference
|
|
14
|
+
* <div sqTooltip="tooltip"></div>
|
|
15
|
+
*
|
|
16
|
+
* <ng-template #tooltip>
|
|
17
|
+
* <h2>Title</h2>
|
|
18
|
+
* <p>{{ "this is a comment" | uppercase }}</p>
|
|
19
|
+
* <h3>Other text</h3>
|
|
20
|
+
* </ng-template>
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* //HTML can be used directly (not recommanded)
|
|
24
|
+
* <div sqTooltip="<h1>Title</h1><br><p>This is a comment</p>"></div>
|
|
25
|
+
*/
|
|
26
|
+
export declare class TooltipDirective<TooltipData = undefined, TooltipDisplay = string> implements OnDestroy {
|
|
27
|
+
private overlay;
|
|
28
|
+
private overlayPositionBuilder;
|
|
29
|
+
private elementRef;
|
|
30
|
+
/**
|
|
31
|
+
* Defining a property called textOrTemplate that can be a string, a function that
|
|
32
|
+
* returns an Observable of a string or undefined, or a TemplateRef.
|
|
33
|
+
*/
|
|
34
|
+
value?: TooltipDisplay | ((data?: TooltipData) => Observable<TooltipDisplay | undefined> | undefined);
|
|
35
|
+
data?: TooltipData;
|
|
36
|
+
template?: TemplateRef<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Setting the default value of the placement property to `bottom`
|
|
39
|
+
*/
|
|
40
|
+
placement: Placement;
|
|
41
|
+
/**
|
|
42
|
+
* List of fallback placement if *Placement* defined can't be applyied
|
|
43
|
+
*/
|
|
44
|
+
fallbackPlacements: Placement[];
|
|
45
|
+
/**
|
|
46
|
+
* Delay in millisecond before showing/hiding the tooltip.
|
|
47
|
+
*
|
|
48
|
+
* Default value is 300ms
|
|
49
|
+
*/
|
|
50
|
+
delay: number;
|
|
51
|
+
/**
|
|
52
|
+
* If the tooltip should stay opened on hover
|
|
53
|
+
*/
|
|
54
|
+
hoverableTooltip: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Custom class for the tooltip
|
|
57
|
+
*/
|
|
58
|
+
tooltipClass?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Applies the "has-tooltip" class to its host when displayed
|
|
61
|
+
*/
|
|
62
|
+
hasTooltip: boolean;
|
|
63
|
+
private overlayRef;
|
|
64
|
+
private subscription?;
|
|
65
|
+
private clearTimeout?;
|
|
66
|
+
static activeTooltip?: TooltipDirective<any, any>;
|
|
67
|
+
constructor(overlay: Overlay, overlayPositionBuilder: OverlayPositionBuilder, elementRef: ElementRef);
|
|
68
|
+
ngOnDestroy(): void;
|
|
69
|
+
show(): void;
|
|
70
|
+
mouseClick(): void;
|
|
71
|
+
hide(): void;
|
|
72
|
+
cancelHide(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Clear timeout function and detach overlayRef
|
|
75
|
+
*/
|
|
76
|
+
clear(): void;
|
|
77
|
+
position(placement?: Placement): ConnectedPosition;
|
|
78
|
+
fallbackPositions(): ConnectedPosition[];
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective<any, any>, never>;
|
|
80
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective<any, any>, "[sqTooltip]", never, { "value": { "alias": "sqTooltip"; "required": false; }; "data": { "alias": "sqTooltipData"; "required": false; }; "template": { "alias": "sqTooltipTemplate"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "fallbackPlacements": { "alias": "fallbackPlacements"; "required": false; }; "delay": { "alias": "delay"; "required": false; }; "hoverableTooltip": { "alias": "hoverableTooltip"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
81
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Supported message type */
|
|
2
|
+
export type MessageType = "text" | "image" | "video";
|
|
3
|
+
/** Generic message content schema */
|
|
4
|
+
export type MessageContent = {
|
|
5
|
+
type: MessageType;
|
|
6
|
+
};
|
|
7
|
+
/** Text specific message content */
|
|
8
|
+
export type TextMessageContent = MessageContent & {
|
|
9
|
+
type: "text";
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Image specific message content
|
|
14
|
+
* Images can be:
|
|
15
|
+
* - Pageshot: Image from a page (offset, length, pageNumber, remappedOffset, remappedLength)
|
|
16
|
+
* - Base64: Image encoded in base64 (base64)
|
|
17
|
+
* - External URL: Image from an URL (isFromDC = false)
|
|
18
|
+
* - Document cache: Image from an indexed document (isFromDC = true)
|
|
19
|
+
*/
|
|
20
|
+
export type ImageMessageContent = MessageContent & {
|
|
21
|
+
type: "image";
|
|
22
|
+
imageData: {
|
|
23
|
+
$type: "base64" | "url";
|
|
24
|
+
mimeType: string;
|
|
25
|
+
name: string;
|
|
26
|
+
base64?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
isFromDC?: true;
|
|
29
|
+
length?: number;
|
|
30
|
+
offSet?: number;
|
|
31
|
+
pageNumber?: number;
|
|
32
|
+
remappedLength?: number;
|
|
33
|
+
remappedOffset?: number;
|
|
34
|
+
url?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Video specific message content
|
|
39
|
+
* Image correspond to the send image to the LLM and can be used as thumbnail
|
|
40
|
+
*/
|
|
41
|
+
export type VideoMessageContent = MessageContent & {
|
|
42
|
+
type: "video";
|
|
43
|
+
videoData: {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
fileName: string;
|
|
47
|
+
imageMimeType: string;
|
|
48
|
+
imageUrl: string;
|
|
49
|
+
videoMimeType: string;
|
|
50
|
+
videoUrl: string;
|
|
51
|
+
timeCode: number;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export type RawMessageContent = string | MessageContent[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Article } from "@sinequa/atomic";
|
|
2
|
+
/** Type of a context image reference */
|
|
3
|
+
export type MessageImageReference = {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
mimeType?: string;
|
|
9
|
+
article?: Article;
|
|
10
|
+
articleId?: string;
|
|
11
|
+
};
|