@epam/ai-dial-shared 0.47.0-dev.87 → 0.47.0-dev.89
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 +13 -1
- package/package.json +1 -1
- package/src/types/chat.d.ts +74 -0
package/index.esm.js
CHANGED
|
@@ -92,6 +92,18 @@ var LikeState;
|
|
|
92
92
|
LikeState[LikeState["Liked"] = 1] = "Liked";
|
|
93
93
|
LikeState[LikeState["NoState"] = 0] = "NoState";
|
|
94
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 = {}));
|
|
95
107
|
var UploadStatus;
|
|
96
108
|
(function (UploadStatus) {
|
|
97
109
|
UploadStatus["UNINITIALIZED"] = "UNINITIALIZED";
|
|
@@ -363,4 +375,4 @@ var VisualizerConnectorRequests;
|
|
|
363
375
|
VisualizerConnectorRequests["setVisualizerOptions"] = "SET_VISUALIZER_OPTIONS";
|
|
364
376
|
})(VisualizerConnectorRequests || (VisualizerConnectorRequests = {}));
|
|
365
377
|
|
|
366
|
-
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 };
|
|
378
|
+
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
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;
|