@epam/ai-dial-shared 0.46.0 → 0.47.0-dev.101
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.esm.js +16 -1
- package/package.json +1 -1
- package/src/constants/overlay.d.ts +1 -0
- package/src/types/chat.d.ts +74 -0
- package/src/types/features.d.ts +2 -0
- package/src/types/message-form-schema.d.ts +3 -0
- package/src/types/overlay/request.d.ts +3 -0
- package/src/types/overlay/response.d.ts +1 -0
- package/src/types/visualizer-connector.d.ts +2 -0
package/index.esm.js
CHANGED
|
@@ -9,6 +9,7 @@ var Feature;
|
|
|
9
9
|
Feature["PromptsPanelToggle"] = "prompts-panel-toggle";
|
|
10
10
|
Feature["ShowConversationsSectionByDefault"] = "showConversationsSectionByDefault";
|
|
11
11
|
Feature["ShowPromptsSectionByDefault"] = "showPromptsSectionByDefault";
|
|
12
|
+
Feature["MdSidebarOverlayBreakpoint"] = "md-sidebar-overlay-breakpoint";
|
|
12
13
|
Feature["ShowLayoutDividers"] = "show-layout-dividers";
|
|
13
14
|
Feature["AttachmentsManager"] = "attachments-manager";
|
|
14
15
|
Feature["ChatFullWidthByDefault"] = "chat-full-width-by-default";
|
|
@@ -23,6 +24,7 @@ var Feature;
|
|
|
23
24
|
Feature["HideTopContextMenu"] = "hide-top-context-menu";
|
|
24
25
|
Feature["DisallowChangeAgent"] = "disallow-change-agent";
|
|
25
26
|
// Conversation functions
|
|
27
|
+
Feature["CompareModeDisabled"] = "compare-mode-disabled";
|
|
26
28
|
Feature["Likes"] = "likes";
|
|
27
29
|
Feature["DislikeComment"] = "dislike-comment";
|
|
28
30
|
Feature["InputFiles"] = "input-files";
|
|
@@ -90,6 +92,18 @@ var LikeState;
|
|
|
90
92
|
LikeState[LikeState["Liked"] = 1] = "Liked";
|
|
91
93
|
LikeState[LikeState["NoState"] = 0] = "NoState";
|
|
92
94
|
})(LikeState || (LikeState = {}));
|
|
95
|
+
var MessageAnnotationSelectorType;
|
|
96
|
+
(function (MessageAnnotationSelectorType) {
|
|
97
|
+
MessageAnnotationSelectorType["TextCharacterRange"] = "text_character_range";
|
|
98
|
+
MessageAnnotationSelectorType["TextLineRange"] = "text_line_range";
|
|
99
|
+
MessageAnnotationSelectorType["PdfPageRange"] = "pdf_page_range";
|
|
100
|
+
MessageAnnotationSelectorType["PdfRegion"] = "pdf_region";
|
|
101
|
+
MessageAnnotationSelectorType["ImageRegion"] = "image_region";
|
|
102
|
+
MessageAnnotationSelectorType["ImageMask"] = "image_mask";
|
|
103
|
+
MessageAnnotationSelectorType["ExcelRcRange"] = "excel_rc_range";
|
|
104
|
+
MessageAnnotationSelectorType["HTMLId"] = "html_id";
|
|
105
|
+
MessageAnnotationSelectorType["HTMLText"] = "html_text";
|
|
106
|
+
})(MessageAnnotationSelectorType || (MessageAnnotationSelectorType = {}));
|
|
93
107
|
var UploadStatus;
|
|
94
108
|
(function (UploadStatus) {
|
|
95
109
|
UploadStatus["UNINITIALIZED"] = "UNINITIALIZED";
|
|
@@ -260,6 +274,7 @@ var OverlayRequests;
|
|
|
260
274
|
OverlayRequests["updateMessage"] = "UPDATE_MESSAGE";
|
|
261
275
|
OverlayRequests["setInputContent"] = "SET_INPUT_CONTENT";
|
|
262
276
|
OverlayRequests["setSystemPrompt"] = "SET_SYSTEM_PROMPT";
|
|
277
|
+
OverlayRequests["setTemperature"] = "SET_TEMPERATURE";
|
|
263
278
|
OverlayRequests["setOverlayOptions"] = "SET_OVERLAY_OPTIONS";
|
|
264
279
|
OverlayRequests["getConversations"] = "GET_CONVERSATIONS";
|
|
265
280
|
OverlayRequests["getSelectedConversations"] = "GET_SELECTED_CONVERSATIONS";
|
|
@@ -361,4 +376,4 @@ var VisualizerConnectorRequests;
|
|
|
361
376
|
VisualizerConnectorRequests["setVisualizerOptions"] = "SET_VISUALIZER_OPTIONS";
|
|
362
377
|
})(VisualizerConnectorRequests || (VisualizerConnectorRequests = {}));
|
|
363
378
|
|
|
364
|
-
export { ConversationResponseFormat, DeferredRequest, DialSchemaProperties, Feature, FeatureType, FormSchemaPropertyWidget, LikeState, MessageButtonPlacement, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, ToolsetAuthStatus, ToolsetAuthTypes, ToolsetTransportType, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
|
|
379
|
+
export { ConversationResponseFormat, DeferredRequest, DialSchemaProperties, Feature, FeatureType, FormSchemaPropertyWidget, LikeState, MessageAnnotationSelectorType, MessageButtonPlacement, OverlayEvents, OverlayRequests, PublishActions, Role, SharePermission, Task, ToolsetAuthStatus, ToolsetAuthTypes, ToolsetTransportType, UploadStatus, VisualizerConnectorEvents, VisualizerConnectorRequests, overlayAppName, overlayLibName, setStyles, validateFeature, visualizerConnectorLibName };
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ export declare enum OverlayRequests {
|
|
|
6
6
|
updateMessage = "UPDATE_MESSAGE",
|
|
7
7
|
setInputContent = "SET_INPUT_CONTENT",
|
|
8
8
|
setSystemPrompt = "SET_SYSTEM_PROMPT",
|
|
9
|
+
setTemperature = "SET_TEMPERATURE",
|
|
9
10
|
setOverlayOptions = "SET_OVERLAY_OPTIONS",
|
|
10
11
|
getConversations = "GET_CONVERSATIONS",
|
|
11
12
|
getSelectedConversations = "GET_SELECTED_CONVERSATIONS",
|
package/src/types/chat.d.ts
CHANGED
|
@@ -40,6 +40,77 @@ export interface MessageSettings {
|
|
|
40
40
|
export interface ConversationEntityModel {
|
|
41
41
|
id: string;
|
|
42
42
|
}
|
|
43
|
+
export declare enum MessageAnnotationSelectorType {
|
|
44
|
+
TextCharacterRange = "text_character_range",
|
|
45
|
+
TextLineRange = "text_line_range",
|
|
46
|
+
PdfPageRange = "pdf_page_range",
|
|
47
|
+
PdfRegion = "pdf_region",
|
|
48
|
+
ImageRegion = "image_region",
|
|
49
|
+
ImageMask = "image_mask",
|
|
50
|
+
ExcelRcRange = "excel_rc_range",
|
|
51
|
+
HTMLId = "html_id",
|
|
52
|
+
HTMLText = "html_text"
|
|
53
|
+
}
|
|
54
|
+
export interface MessageAnnotationBBox {
|
|
55
|
+
left: number;
|
|
56
|
+
top: number;
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
}
|
|
60
|
+
export type MessageAnnotationSelector = {
|
|
61
|
+
type: MessageAnnotationSelectorType.TextCharacterRange | MessageAnnotationSelectorType.TextLineRange | MessageAnnotationSelectorType.PdfPageRange;
|
|
62
|
+
start: number;
|
|
63
|
+
end: number;
|
|
64
|
+
} | {
|
|
65
|
+
type: MessageAnnotationSelectorType.PdfRegion;
|
|
66
|
+
page: number;
|
|
67
|
+
bbox: MessageAnnotationBBox;
|
|
68
|
+
} | {
|
|
69
|
+
type: MessageAnnotationSelectorType.ImageRegion;
|
|
70
|
+
bbox: MessageAnnotationBBox;
|
|
71
|
+
} | {
|
|
72
|
+
type: MessageAnnotationSelectorType.ImageMask;
|
|
73
|
+
mask: string;
|
|
74
|
+
} | {
|
|
75
|
+
type: MessageAnnotationSelectorType.ExcelRcRange;
|
|
76
|
+
start: {
|
|
77
|
+
row: number;
|
|
78
|
+
col: number;
|
|
79
|
+
};
|
|
80
|
+
end: {
|
|
81
|
+
row: number;
|
|
82
|
+
col: number;
|
|
83
|
+
};
|
|
84
|
+
} | {
|
|
85
|
+
type: MessageAnnotationSelectorType.HTMLId;
|
|
86
|
+
id: string;
|
|
87
|
+
} | {
|
|
88
|
+
type: MessageAnnotationSelectorType.HTMLText;
|
|
89
|
+
text: string;
|
|
90
|
+
};
|
|
91
|
+
export interface ChatCompletionSource {
|
|
92
|
+
message_index: number | null;
|
|
93
|
+
content_part_index: number | null;
|
|
94
|
+
attachment_index: number | null;
|
|
95
|
+
}
|
|
96
|
+
export interface AttachmentSource {
|
|
97
|
+
type: 'attachment';
|
|
98
|
+
attachment: Attachment;
|
|
99
|
+
}
|
|
100
|
+
export interface MessageAnnotation {
|
|
101
|
+
index: number;
|
|
102
|
+
target: {
|
|
103
|
+
source?: ChatCompletionSource;
|
|
104
|
+
selector: MessageAnnotationSelector;
|
|
105
|
+
};
|
|
106
|
+
body: {
|
|
107
|
+
title?: string;
|
|
108
|
+
quote?: string;
|
|
109
|
+
source?: ChatCompletionSource | AttachmentSource;
|
|
110
|
+
selector?: MessageAnnotationSelector | MessageAnnotationSelector[];
|
|
111
|
+
configuration?: Record<string, unknown>;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
43
114
|
export interface Message {
|
|
44
115
|
role: Role;
|
|
45
116
|
content: string;
|
|
@@ -52,6 +123,9 @@ export interface Message {
|
|
|
52
123
|
configuration_schema?: MessageFormSchema;
|
|
53
124
|
configuration_value?: MessageFormValue;
|
|
54
125
|
};
|
|
126
|
+
custom_fields?: {
|
|
127
|
+
annotations?: MessageAnnotation[];
|
|
128
|
+
};
|
|
55
129
|
like?: LikeState;
|
|
56
130
|
errorMessage?: string;
|
|
57
131
|
model?: ConversationEntityModel;
|
package/src/types/features.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare enum Feature {
|
|
|
7
7
|
PromptsPanelToggle = "prompts-panel-toggle",// Show prompts panel toggle in the corner without app header
|
|
8
8
|
ShowConversationsSectionByDefault = "showConversationsSectionByDefault",// show conversations sidebar by default on desktop
|
|
9
9
|
ShowPromptsSectionByDefault = "showPromptsSectionByDefault",// show prompts sidebar by default on desktop
|
|
10
|
+
MdSidebarOverlayBreakpoint = "md-sidebar-overlay-breakpoint",// use md (768px) instead of xl (1280px) sidebar overlay breakpoint in iframe embed
|
|
10
11
|
ShowLayoutDividers = "show-layout-dividers",// show dividers between chat and sidebars
|
|
11
12
|
AttachmentsManager = "attachments-manager",// Display attachments manager in conversation
|
|
12
13
|
ChatFullWidthByDefault = "chat-full-width-by-default",// Enforce chat full-width
|
|
@@ -18,6 +19,7 @@ export declare enum Feature {
|
|
|
18
19
|
TopChatModelSettings = "top-chat-model-settings",// Display change model settings button
|
|
19
20
|
HideTopContextMenu = "hide-top-context-menu",// Hide top context menu button
|
|
20
21
|
DisallowChangeAgent = "disallow-change-agent",// Disallow "Change agent" button
|
|
22
|
+
CompareModeDisabled = "compare-mode-disabled",// Disable compare mode (sidebar button, conversation context menu). Enabled by default
|
|
21
23
|
Likes = "likes",// Display likes
|
|
22
24
|
DislikeComment = "dislike-comment",// Enable adding comment when disliking a message
|
|
23
25
|
InputFiles = "input-files",// Allow attach files to conversation
|
|
@@ -11,10 +11,13 @@ export type MessageFormValueType = number | string | boolean | string[];
|
|
|
11
11
|
export interface FormSchemaButtonOption {
|
|
12
12
|
title: string;
|
|
13
13
|
const: Exclude<MessageFormValueType, string[]>;
|
|
14
|
+
description?: string;
|
|
14
15
|
[DialSchemaProperties.DialWidgetOptions]?: {
|
|
15
16
|
confirmationMessage?: string;
|
|
16
17
|
populateText?: string;
|
|
17
18
|
submit?: boolean;
|
|
19
|
+
/** When `true`, option `description` is shown in read-only user messages. Defaults to `false`. */
|
|
20
|
+
showDescriptionInUserMessage?: boolean;
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
export interface FormSchemaDefinition {
|
|
@@ -16,6 +16,9 @@ export interface SetInputContentRequest {
|
|
|
16
16
|
export interface SetSystemPromptRequest {
|
|
17
17
|
systemPrompt: string;
|
|
18
18
|
}
|
|
19
|
+
export interface SetTemperatureRequest {
|
|
20
|
+
temperature: number;
|
|
21
|
+
}
|
|
19
22
|
export interface CreateConversationRequest {
|
|
20
23
|
parentPath?: string | null;
|
|
21
24
|
local?: boolean | null;
|
|
@@ -3,6 +3,7 @@ import { LatestExportConversationsFormat } from '../import-export';
|
|
|
3
3
|
import { OverlayConversation } from './conversation';
|
|
4
4
|
export type SendMessageResponse = void;
|
|
5
5
|
export type SetSystemPromptResponse = void;
|
|
6
|
+
export type SetTemperatureResponse = void;
|
|
6
7
|
export interface GetMessagesResponse {
|
|
7
8
|
messages: Message[];
|
|
8
9
|
}
|