@epam/statgpt-conversation-view 0.1.0-rc.0 → 0.1.0-rc.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.
- package/constants/custom-content-properties.d.ts +10 -0
- package/constants/errors.d.ts +1 -0
- package/constants/grid.d.ts +7 -2
- package/constants/onboarding-elements.d.ts +14 -0
- package/index.d.ts +3 -0
- package/index.js +16 -15
- package/index.mjs +11587 -10049
- package/models/actions.d.ts +3 -1
- package/models/attachments-styles.d.ts +1 -0
- package/models/attachments.d.ts +5 -1
- package/models/charting.d.ts +13 -0
- package/models/filters.d.ts +6 -2
- package/models/message.d.ts +12 -0
- package/models/titles.d.ts +25 -0
- package/package.json +7 -6
- package/types/actions.d.ts +4 -1
- package/utils/attachments/charting/chart-legend-width.d.ts +2 -0
- package/utils/attachments/data-grid/columns.d.ts +5 -2
- package/utils/attachments/data-grid/data-grid.d.ts +4 -1
- package/utils/attachments/time-period.d.ts +3 -0
- package/utils/attachments-details.d.ts +4 -0
- package/utils/generate-onboarding-conversation.d.ts +16 -0
- package/utils/get-filled-filters.d.ts +3 -3
- package/utils/get-tooltip-data.by-element.d.ts +11 -0
- package/utils/get-updated-data-queries.d.ts +2 -0
- package/utils/messages.d.ts +1 -0
- package/utils/system-message.d.ts +2 -2
- package/utils/transform-message-api.d.ts +3 -0
- package/utils/validate-message.d.ts +1 -1
- package/utils/query-filters-details.d.ts +0 -6
package/models/actions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetAttachmentContent, GetBucket, GetDatasetData, GetDatasetDetails, UpdateConversation, getConstraints, CreateConversation } from '../types/actions';
|
|
1
|
+
import { GetAttachmentContent, GetBucket, GetDatasetData, GetDatasetDetails, UpdateConversation, getConstraints, CreateConversation, RateResponse, PutOnboardingFile } from '../types/actions';
|
|
2
2
|
import { DataQuery } from '../../../shared-toolkit/src/models/data-query';
|
|
3
3
|
import { Dataflow } from '../../../sdmx-toolkit/src/models/structural-metadata/dataflow';
|
|
4
4
|
import { DownloadDatasetAction } from '../../../download-panel/src/types/actions';
|
|
@@ -6,6 +6,7 @@ import { GetConversation } from '../../../share-conversation/src/models/share-co
|
|
|
6
6
|
import { ConversationInfo } from '@epam/ai-dial-shared';
|
|
7
7
|
export interface AttachmentsActions {
|
|
8
8
|
getFile: GetAttachmentContent;
|
|
9
|
+
putOnboardingFile: PutOnboardingFile;
|
|
9
10
|
getDataSet: GetDatasetDetails;
|
|
10
11
|
getDataSetData: GetDatasetData;
|
|
11
12
|
getConstraints: getConstraints;
|
|
@@ -20,5 +21,6 @@ export type ConversationViewActions = AttachmentsActions & {
|
|
|
20
21
|
getBucket: GetBucket;
|
|
21
22
|
updateConversation: UpdateConversation;
|
|
22
23
|
createConversation: CreateConversation;
|
|
24
|
+
rateResponse: RateResponse;
|
|
23
25
|
};
|
|
24
26
|
export type AdvancedViewActions = AttachmentsActions;
|
package/models/attachments.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Attachment } from '@epam/ai-dial-shared';
|
|
2
2
|
import { AttachmentsStyles } from './attachments-styles';
|
|
3
3
|
import { GridData } from '../types/data-grid/grid-data';
|
|
4
|
-
import { DataQuery } from '../../../shared-toolkit/src/models/data-query';
|
|
4
|
+
import { DataQuery, QueryFilterDetails } from '../../../shared-toolkit/src/models/data-query';
|
|
5
5
|
import { ColDef } from 'ag-grid-community';
|
|
6
6
|
import { ChartingData } from './charting';
|
|
7
7
|
import { Dataflow } from '../../../sdmx-toolkit/src/models/structural-metadata/dataflow';
|
|
@@ -20,3 +20,7 @@ export interface AttachmentsProps {
|
|
|
20
20
|
datasets?: Dataflow[];
|
|
21
21
|
styles?: AttachmentsStyles;
|
|
22
22
|
}
|
|
23
|
+
export interface AttachmentInfo {
|
|
24
|
+
datasetName?: string;
|
|
25
|
+
queryFiltersDetails?: QueryFilterDetails[];
|
|
26
|
+
}
|
package/models/charting.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ImagePatternObject } from 'echarts';
|
|
1
2
|
import { GridData } from '../types/data-grid/grid-data';
|
|
2
3
|
import { EChartsOption } from 'echarts-for-react';
|
|
3
4
|
export interface ChartUnitRows {
|
|
@@ -16,3 +17,15 @@ export interface DimensionInfo {
|
|
|
16
17
|
export interface ChartingData {
|
|
17
18
|
units: ChartUnit[];
|
|
18
19
|
}
|
|
20
|
+
export interface ChartingTooltipFormatterParams {
|
|
21
|
+
axisValueLabel?: string;
|
|
22
|
+
marker?: string;
|
|
23
|
+
seriesName?: string;
|
|
24
|
+
value: string | number | Date | null | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface ChartingPainterBase {
|
|
27
|
+
getRenderedCanvas(opts?: {
|
|
28
|
+
backgroundColor?: string | ImagePatternObject;
|
|
29
|
+
pixelRatio?: number;
|
|
30
|
+
}): HTMLCanvasElement;
|
|
31
|
+
}
|
package/models/filters.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
-
import { UpdateConversation } from '../types/actions';
|
|
2
|
+
import { PutOnboardingFile, UpdateConversation } from '../types/actions';
|
|
3
3
|
import { Dimension } from '../../../sdmx-toolkit/src/models/structural-metadata/data-structure';
|
|
4
4
|
import { StructuralData, StructuralMetaData } from '../../../sdmx-toolkit/src/models/structural-metadata';
|
|
5
5
|
import { StructureItemBase } from '../../../sdmx-toolkit/src/models/data/structure';
|
|
@@ -50,10 +50,12 @@ export interface FiltersModalProps {
|
|
|
50
50
|
isShowClearIcon?: boolean;
|
|
51
51
|
isShowCancelButton?: boolean;
|
|
52
52
|
filterValuesProps?: FilterValuesProps;
|
|
53
|
+
resetIcon?: ReactNode;
|
|
53
54
|
}
|
|
54
55
|
export interface FiltersProps {
|
|
55
56
|
actions?: {
|
|
56
57
|
getConstraints: (urn: string, filters?: SeriesFilterDto[]) => Promise<StructuralMetaData>;
|
|
58
|
+
putOnboardingFile?: PutOnboardingFile;
|
|
57
59
|
};
|
|
58
60
|
dimensions?: Dimension[];
|
|
59
61
|
structureDimensions?: StructureItemBase[];
|
|
@@ -62,7 +64,8 @@ export interface FiltersProps {
|
|
|
62
64
|
buttonProps?: FilterButtonProps;
|
|
63
65
|
modalProps?: FiltersModalProps;
|
|
64
66
|
attachmentsDataQuery?: DataQuery;
|
|
65
|
-
|
|
67
|
+
dataQueries?: DataQuery[];
|
|
68
|
+
onFiltersChange?: (filterParams: DatasetQueryFilters, constraints: DataConstraints[], modalFilters?: Filter[]) => void;
|
|
66
69
|
locale?: string;
|
|
67
70
|
timeRangeOptions?: TimeRangeOptions[];
|
|
68
71
|
titles?: ConversationViewTitles;
|
|
@@ -70,4 +73,5 @@ export interface FiltersProps {
|
|
|
70
73
|
conversation?: Conversation | null;
|
|
71
74
|
setConversation?: Dispatch<SetStateAction<Conversation | null>>;
|
|
72
75
|
updateConversation: UpdateConversation;
|
|
76
|
+
updateDataQueries?: (dataQueries?: DataQuery[]) => void;
|
|
73
77
|
}
|
package/models/message.d.ts
CHANGED
|
@@ -10,3 +10,15 @@ export interface InputMessageStyles {
|
|
|
10
10
|
inputContainerClass?: string;
|
|
11
11
|
sendMessageIcon?: ReactNode;
|
|
12
12
|
}
|
|
13
|
+
export interface MessageActionIcons {
|
|
14
|
+
copy?: ReactNode;
|
|
15
|
+
regenerate?: ReactNode;
|
|
16
|
+
thumbUp?: ReactNode;
|
|
17
|
+
thumbDown?: ReactNode;
|
|
18
|
+
edit?: ReactNode;
|
|
19
|
+
thumbPressed?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export interface EditMessageTitles {
|
|
22
|
+
cancel?: string;
|
|
23
|
+
send?: string;
|
|
24
|
+
}
|
package/models/titles.d.ts
CHANGED
|
@@ -46,4 +46,29 @@ export interface ConversationViewTitles {
|
|
|
46
46
|
limitLinkInfoLink?: string;
|
|
47
47
|
queryUpdatedManually?: string;
|
|
48
48
|
setTo?: string;
|
|
49
|
+
signOut?: string;
|
|
50
|
+
loading?: string;
|
|
51
|
+
onboardingTitle?: string;
|
|
52
|
+
onboardingFooter?: string;
|
|
53
|
+
onboardingFooterLink?: string;
|
|
54
|
+
skipOnboardingNow?: string;
|
|
55
|
+
refuseOnboarding?: string;
|
|
56
|
+
dataGridTitle?: string;
|
|
57
|
+
dataGridDescription?: string;
|
|
58
|
+
metadataPerSeriesTitle?: string;
|
|
59
|
+
metadataPerSeriesDescription?: string;
|
|
60
|
+
chartsTitle?: string;
|
|
61
|
+
chartsDescription?: string;
|
|
62
|
+
chartsNavigationTitle?: string;
|
|
63
|
+
chartsNavigationDescription?: string;
|
|
64
|
+
openAdvancedViewTitle?: string;
|
|
65
|
+
openAdvancedViewDescription?: string;
|
|
66
|
+
filtersTitle?: string;
|
|
67
|
+
filtersDescription?: string;
|
|
68
|
+
chartPerSeriesTitle?: string;
|
|
69
|
+
chartPerSeriesDescription?: string;
|
|
70
|
+
metadataPerDatasetTitle?: string;
|
|
71
|
+
metadataPerDatasetDescription?: string;
|
|
72
|
+
exitAdvancedViewTitle?: string;
|
|
73
|
+
exitAdvancedViewDescription?: string;
|
|
49
74
|
}
|
package/package.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/statgpt-conversation-view",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"react": "^19.1.0",
|
|
7
7
|
"classnames": "^2.5.1",
|
|
8
8
|
"@epam/ai-dial-shared": "^0.34.0",
|
|
9
9
|
"@tabler/icons-react": "^3.34.1",
|
|
10
|
-
"@epam/statgpt-shared-toolkit": "0.1.0-rc.
|
|
11
|
-
"@epam/statgpt-ui-components": "0.1.0-rc.
|
|
12
|
-
"@epam/statgpt-sdmx-toolkit": "0.1.0-rc.
|
|
10
|
+
"@epam/statgpt-shared-toolkit": "0.1.0-rc.2",
|
|
11
|
+
"@epam/statgpt-ui-components": "0.1.0-rc.2",
|
|
12
|
+
"@epam/statgpt-sdmx-toolkit": "0.1.0-rc.2",
|
|
13
13
|
"react-window": "^1.8.11",
|
|
14
14
|
"react-virtualized-auto-sizer": "^1.0.26",
|
|
15
15
|
"ag-grid-community": "33.3.2",
|
|
16
16
|
"ag-grid-react": "^33.3.2",
|
|
17
17
|
"@floating-ui/react": "^0.27.14",
|
|
18
|
+
"echarts": "^5.6.0",
|
|
18
19
|
"echarts-for-react": "^3.0.2",
|
|
19
|
-
"@epam/statgpt-dial-toolkit": "0.1.0-rc.
|
|
20
|
+
"@epam/statgpt-dial-toolkit": "0.1.0-rc.2",
|
|
20
21
|
"react-markdown": "^10.1.0",
|
|
21
22
|
"remark-gfm": "^4.0.1",
|
|
22
|
-
"@epam/statgpt-conversation-list": "0.1.0-rc.
|
|
23
|
+
"@epam/statgpt-conversation-list": "0.1.0-rc.2",
|
|
23
24
|
"flatpickr": "4.6.13",
|
|
24
25
|
"react-flatpickr": "^4.0.11",
|
|
25
26
|
"date-fns": "^4.1.0",
|
package/types/actions.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { GridAttachmentContent } from '../../../dial-toolkit/src/models/grid-attachment';
|
|
2
2
|
import { StructuralMetaData } from '../../../sdmx-toolkit/src/models/structural-metadata';
|
|
3
3
|
import { UpdateConversationRequest } from '../../../dial-toolkit/src/models/conversation';
|
|
4
|
-
import { Conversation, ConversationInfo } from '@epam/ai-dial-shared';
|
|
4
|
+
import { Conversation, ConversationInfo, Entity } from '@epam/ai-dial-shared';
|
|
5
5
|
import { DataMessage } from '../../../sdmx-toolkit/src/models/data/data-message';
|
|
6
6
|
import { SeriesFilterDto } from '../../../sdmx-toolkit/src/models/series-filter';
|
|
7
7
|
import { SdmxReferences } from '../../../sdmx-toolkit/src/types/references';
|
|
8
8
|
import { TimeRange } from '../../../shared-toolkit/src/models/time-range';
|
|
9
9
|
import { DatasetQueryFilters } from '../../../sdmx-toolkit/src/models/dataset-query-filters';
|
|
10
|
+
import { OnboardingFileSchema } from '../../../shared-toolkit/src/models/onboarding-schema';
|
|
10
11
|
export type GetAttachmentContent = (fileId: string) => Promise<GridAttachmentContent | null>;
|
|
11
12
|
export type GetDatasetDetails = (datasetId: string, references?: SdmxReferences) => Promise<StructuralMetaData | null>;
|
|
12
13
|
export type GetDatasetData = (datasetId: string, filters: DatasetQueryFilters) => Promise<DataMessage | null>;
|
|
@@ -16,3 +17,5 @@ export type GetBucket = () => Promise<{
|
|
|
16
17
|
}>;
|
|
17
18
|
export type UpdateConversation = (conversationId: string, request: UpdateConversationRequest) => Promise<ConversationInfo>;
|
|
18
19
|
export type getConstraints = (urn: string, filters?: SeriesFilterDto[], timeRange?: TimeRange) => Promise<StructuralMetaData>;
|
|
20
|
+
export type RateResponse = (id: string, rate: boolean) => Promise<void>;
|
|
21
|
+
export type PutOnboardingFile = (fileName: string, filePath: string, fileData: OnboardingFileSchema) => Promise<Entity | null>;
|
|
@@ -4,6 +4,9 @@ import { ColDef } from 'ag-grid-community';
|
|
|
4
4
|
import { FormatNumbersType } from '../../../../../shared-toolkit/src/models/format-numbers-type';
|
|
5
5
|
import { MetadataSettings } from '../../../models/metadata';
|
|
6
6
|
import { ConversationViewTitles } from '../../../models/titles';
|
|
7
|
-
|
|
7
|
+
import { DataConstraints } from '../../../../../sdmx-toolkit/src/models/structural-metadata/constraints';
|
|
8
|
+
import { TimeRange } from '../../../../../shared-toolkit/src';
|
|
9
|
+
import { PutOnboardingFile } from '../../../types/actions';
|
|
10
|
+
export declare function getColumns(structures: StructuralData, data: DataMessage, locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, titles?: ConversationViewTitles, action?: PutOnboardingFile, constraints?: DataConstraints[], selectedTimePeriod?: TimeRange): ColDef[];
|
|
8
11
|
export declare function getDimensionsColumns(data: StructuralData, locale: string): ColDef[];
|
|
9
|
-
export declare function getTimeseriesColumns(structures: StructuralData, data: DataMessage, locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, titles?: ConversationViewTitles): ColDef[];
|
|
12
|
+
export declare function getTimeseriesColumns(structures: StructuralData, data: DataMessage, locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, titles?: ConversationViewTitles, columns?: string[]): ColDef[];
|
|
@@ -7,7 +7,10 @@ import { MetadataSettings } from '../../../models/metadata';
|
|
|
7
7
|
import { DataQuery } from '../../../../../shared-toolkit/src/models/data-query';
|
|
8
8
|
import { ChartingStyles } from '../../../models/attachments-styles';
|
|
9
9
|
import { ConversationViewTitles } from '../../../models/titles';
|
|
10
|
-
|
|
10
|
+
import { DataConstraints } from '../../../../../sdmx-toolkit/src/models/structural-metadata/constraints';
|
|
11
|
+
import { TimeRange } from '../../../../../shared-toolkit/src';
|
|
12
|
+
import { PutOnboardingFile } from '../../../types/actions';
|
|
13
|
+
export declare function buildGridData(structures: StructuralData, data: DataMessage, dataQuery: DataQuery | undefined, locale: string, formattingSettings?: FormatNumbersType, metadataSettings?: MetadataSettings, chartStyles?: ChartingStyles, titles?: ConversationViewTitles, action?: PutOnboardingFile, constraints?: DataConstraints[], selectedTimePeriod?: TimeRange): {
|
|
11
14
|
data: GridData[];
|
|
12
15
|
columns: ColDef[];
|
|
13
16
|
};
|
|
@@ -2,6 +2,8 @@ import { CalendarResolution } from '../../../../shared-toolkit/src/types/calenda
|
|
|
2
2
|
import { OptionsType } from 'react-flatpickr';
|
|
3
3
|
import { TimeRange } from '../../../../shared-toolkit/src/models/time-range';
|
|
4
4
|
import { ConversationViewTitles } from '../../models/titles';
|
|
5
|
+
import { SeriesFilterDto } from '../../../../sdmx-toolkit/src/models';
|
|
6
|
+
import { DataQuery } from '../../../../shared-toolkit/src';
|
|
5
7
|
export declare const getPickerOptions: (minDate: Date, maxDate: Date, calendarResolution: CalendarResolution, lang: string, startFromMonday?: boolean, dateFormat?: string) => OptionsType;
|
|
6
8
|
export declare const correctTimeZone: (date: Date) => void;
|
|
7
9
|
export declare const dayTimeFormatOptions: Intl.DateTimeFormatOptions;
|
|
@@ -10,3 +12,4 @@ export declare const getDateString: (date?: Date | null, locale?: string) => str
|
|
|
10
12
|
export declare const getMergedTimeRange: (attachmentTimeRange: TimeRange, constraintsTimeRange: TimeRange) => TimeRange;
|
|
11
13
|
export declare const getRangedTimePeriod: (initialTimeRange: TimeRange, period: string | number) => TimeRange;
|
|
12
14
|
export declare const localizeTimePeriod: (period: string, titles?: ConversationViewTitles) => string;
|
|
15
|
+
export declare const getFiltersDtoFromDataQuery: (dataQuery: DataQuery) => SeriesFilterDto[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataQuery } from '../../../shared-toolkit/src/models/data-query';
|
|
2
|
+
import { StructuralData } from '../../../sdmx-toolkit/src/models/structural-metadata';
|
|
3
|
+
import { AttachmentInfo } from '../models/attachments';
|
|
4
|
+
export declare const getAttachmentInfoList: (previousDataQueries: DataQuery[], currentDataQueries: DataQuery[], datasetStructuresMap: Map<string, StructuralData | undefined>, locale: string) => AttachmentInfo[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Role } from '@epam/ai-dial-shared';
|
|
2
|
+
export declare const generateOnboardingConversation: (bucket: string, locale: string, name: string, assistantMessageContent: string, prompt?: string, choiceId?: string) => {
|
|
3
|
+
name: string;
|
|
4
|
+
folderId: string;
|
|
5
|
+
prompt: string | undefined;
|
|
6
|
+
id: string;
|
|
7
|
+
messages: {
|
|
8
|
+
role: Role;
|
|
9
|
+
content: string;
|
|
10
|
+
}[];
|
|
11
|
+
custom_fields: {
|
|
12
|
+
configuration: {
|
|
13
|
+
choice: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -7,12 +7,12 @@ export declare const getFilledFilters: (filters?: Filter[], dimensions?: Dimensi
|
|
|
7
7
|
isDisabled: boolean;
|
|
8
8
|
dimensionValues: {
|
|
9
9
|
isSelectedValue: boolean | undefined;
|
|
10
|
-
codes?: import('../../../sdmx-toolkit/src/models
|
|
10
|
+
codes?: import('../../../sdmx-toolkit/src/models').Code[];
|
|
11
11
|
agencyID?: string;
|
|
12
12
|
version?: string;
|
|
13
13
|
urn?: string;
|
|
14
|
-
annotations?: import('../../../sdmx-toolkit/src/models
|
|
15
|
-
links?: import('../../../sdmx-toolkit/src/models
|
|
14
|
+
annotations?: import('../../../sdmx-toolkit/src/models').Annotation[];
|
|
15
|
+
links?: import('../../../sdmx-toolkit/src/models').Link[];
|
|
16
16
|
structure?: string;
|
|
17
17
|
id: string;
|
|
18
18
|
name?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConversationViewTitles } from '../models/titles';
|
|
2
|
+
import { OnboardingFileSchema } from '../../../shared-toolkit/src/models/onboarding-schema';
|
|
3
|
+
import { OnboardingElements } from '../constants/onboarding-elements';
|
|
4
|
+
export declare const getTooltipDataByElement: (element: string, titles?: ConversationViewTitles) => {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const getNextTooltipElement: (schema?: OnboardingFileSchema, current?: OnboardingElements) => string;
|
|
9
|
+
export declare const getOnboardingInfoForAdvancedView: (onboardingFileSchema: OnboardingFileSchema) => OnboardingFileSchema;
|
|
10
|
+
export declare const getOnboardingInfoForChartsView: (onboardingFileSchema: OnboardingFileSchema) => OnboardingFileSchema;
|
|
11
|
+
export declare const isShowChartsOnboarding: (onboardingFileSchema: OnboardingFileSchema) => boolean;
|
package/utils/messages.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Message } from '../../../dial-toolkit/src/models';
|
|
2
2
|
export declare const getPreviousMessageWithAttachment: (messages: Message[], currentMessageIndex: number) => Message | undefined;
|
|
3
3
|
export declare const getLastMessageWithAttachmentIndex: (messages: Message[]) => number;
|
|
4
|
+
export declare const getLastAssistantMessage: (messages: Message[]) => Message | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Message } from '@epam/ai-dial-shared';
|
|
2
2
|
import { DataQuery, QueryFilter } from '../../../shared-toolkit/src/models/data-query';
|
|
3
|
-
export declare const prepareSystemMessage: (filters: QueryFilter[], currentDataQuery?: DataQuery) => Message;
|
|
4
|
-
export declare const updateMessagesWithSystemMessage: (messages: Message[], filters: QueryFilter[], currentDataQuery?: DataQuery) => Message[];
|
|
3
|
+
export declare const prepareSystemMessage: (filters: QueryFilter[], currentDataQuery?: DataQuery, dataQueries?: DataQuery[], message?: Message) => Message;
|
|
4
|
+
export declare const updateMessagesWithSystemMessage: (messages: Message[], filters: QueryFilter[], currentDataQuery?: DataQuery, dataQueries?: DataQuery[]) => Message[];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { Conversation } from '@epam/ai-dial-shared';
|
|
2
2
|
import { Message } from '../../../dial-toolkit/src/models/message';
|
|
3
3
|
export declare const transformMessagesForApi: (userMessage: Message, conversation: Conversation | null) => Message[];
|
|
4
|
+
export declare const transformMessages: (messages: Message[]) => Message[];
|
|
5
|
+
export declare const transformRegenerateMessage: (userMessage: Message, conversation: Conversation | null) => Message[];
|
|
6
|
+
export declare const transformEditMessage: (userMessage: Message, conversation: Conversation | null) => Message[];
|
|
@@ -7,4 +7,4 @@ import { Message } from '../../../dial-toolkit/src/models/message';
|
|
|
7
7
|
* @param conversation - The current conversation context.
|
|
8
8
|
* @returns A prepared message object or null if validation fails.
|
|
9
9
|
*/
|
|
10
|
-
export declare const validateAndPrepareMessage: (content: string, isStreaming: boolean, conversation: Conversation | null) => Message | null;
|
|
10
|
+
export declare const validateAndPrepareMessage: (content: string, isStreaming: boolean, conversation: Conversation | null, customChoiceId?: string) => Message | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { QueryFilter, QueryFilterDetails } from '../../../shared-toolkit/src/models/data-query';
|
|
2
|
-
import { Dimension } from '../../../sdmx-toolkit/src/models/structural-metadata/data-structure';
|
|
3
|
-
import { ConceptScheme } from '../../../sdmx-toolkit/src/models/structural-metadata/concept-scheme';
|
|
4
|
-
import { Codelist } from '../../../sdmx-toolkit/src/models/structural-metadata/codelist';
|
|
5
|
-
export declare const getUpdatedQueryFiltersDetails: (previousFilters?: QueryFilterDetails[], currentFilters?: QueryFilterDetails[]) => QueryFilterDetails[];
|
|
6
|
-
export declare const getQueryFiltersDetails: (filters: QueryFilter[], dimensions: Dimension[], conceptSchemes: ConceptScheme[], codelists: Codelist[], locale: string) => QueryFilterDetails[];
|