@glodon-aiot/apis 2.4.7
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/README.git.md +73 -0
- package/README.lib.md +135 -0
- package/dist/es/aecpilot/cosntant.mjs +5 -0
- package/dist/es/aecpilot/index.mjs +510 -0
- package/dist/es/aecpilot/model.mjs +9 -0
- package/dist/es/aecpilotui/index.mjs +607 -0
- package/dist/es/agentcliui/index.mjs +418 -0
- package/dist/es/aishop/index.mjs +97 -0
- package/dist/es/aishop/model.mjs +5 -0
- package/dist/es/auth/index.mjs +52 -0
- package/dist/es/base/index.mjs +158 -0
- package/dist/es/contralyze/index.mjs +91 -0
- package/dist/es/cvforce/index.mjs +431 -0
- package/dist/es/cvforce/model.mjs +12 -0
- package/dist/es/cvforce-datahub/index.mjs +435 -0
- package/dist/es/cvforce-datahub/model.mjs +8 -0
- package/dist/es/cvforce-modelservice/index.mjs +114 -0
- package/dist/es/cvforce-modelservice/model.mjs +4 -0
- package/dist/es/index.mjs +62 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
- package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
- package/dist/es/panorama/index.mjs +136 -0
- package/dist/es/panorama/model.mjs +5 -0
- package/dist/es/pluginmgr/index.mjs +85 -0
- package/dist/es/user/index.mjs +193 -0
- package/dist/es/utils/fetchEventSource/fetch.mjs +112 -0
- package/dist/es/utils/fetchEventSource/parse.mjs +97 -0
- package/dist/es/utils/index.mjs +9 -0
- package/dist/lib/index.js +3 -0
- package/dist/src/aecpilot/cosntant.d.ts +8 -0
- package/dist/src/aecpilot/index.d.ts +79 -0
- package/dist/src/aecpilot/model.d.ts +350 -0
- package/dist/src/aecpilotui/index.d.ts +72 -0
- package/dist/src/aecpilotui/model.d.ts +63 -0
- package/dist/src/agentcliui/index.d.ts +72 -0
- package/dist/src/agentcliui/model.d.ts +39 -0
- package/dist/src/aishop/index.d.ts +26 -0
- package/dist/src/aishop/model.d.ts +111 -0
- package/dist/src/auth/index.d.ts +17 -0
- package/dist/src/auth/model.d.ts +24 -0
- package/dist/src/base/index.d.ts +41 -0
- package/dist/src/base/model.d.ts +20 -0
- package/dist/src/contralyze/index.d.ts +24 -0
- package/dist/src/contralyze/model.d.ts +75 -0
- package/dist/src/cvforce/index.d.ts +130 -0
- package/dist/src/cvforce/model.d.ts +519 -0
- package/dist/src/cvforce-datahub/index.d.ts +186 -0
- package/dist/src/cvforce-datahub/model.d.ts +438 -0
- package/dist/src/cvforce-modelservice/index.d.ts +23 -0
- package/dist/src/cvforce-modelservice/model.d.ts +156 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/src/panorama/index.d.ts +42 -0
- package/dist/src/panorama/model.d.ts +263 -0
- package/dist/src/pluginmgr/index.d.ts +28 -0
- package/dist/src/pluginmgr/model.d.ts +48 -0
- package/dist/src/user/index.d.ts +42 -0
- package/dist/src/user/model.d.ts +247 -0
- package/dist/src/utils/fetchEventSource/fetch.d.ts +44 -0
- package/dist/src/utils/fetchEventSource/index.d.ts +1 -0
- package/dist/src/utils/fetchEventSource/parse.d.ts +36 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { IDataSet, IDataSetParams, IDataSetResult, IVersion, IAM, ILabel, ISample, IMarkType, IProxy, Deduplication, sampleParams, Category, ISampleTextParams, ILlmSample, ISubsectionParams, ISubsectionSample, ILlmSampleSubsection, GenerateParams, GenerateRecord, ILlmSampleV2, ILlmSampleV2ListParams, IPostLlmSampleV2, ILlmContent, ILlmSamplePostParams, Addition, ILabelList, SampleQueryParams, Label, CreateLabelParams, EditLabelParams, IPicsZipResult, IPrelabelTaskParams, IPreLabelTask, ISampleFileParams, IGetDatasetParams, IDataSetCoptTask, IDataSetCoptTaskParams } from './model';
|
|
3
|
+
import { ApiErrorHandler, BaseApi, Paged, PageQueryParams } from '..';
|
|
4
|
+
export declare class CVForceDatahubApi extends BaseApi {
|
|
5
|
+
constructor(axiosInstance?: AxiosInstance, errorHandler?: ApiErrorHandler);
|
|
6
|
+
getDatasets(params: IGetDatasetParams): Promise<IDataSetResult>;
|
|
7
|
+
postDatasets(params: IDataSetParams): Promise<IDataSet>;
|
|
8
|
+
getDatasetsId(id: string): Promise<IDataSet>;
|
|
9
|
+
delDatasetsId(id: string): Promise<IDataSet>;
|
|
10
|
+
patchDatasetsId(id: string, params: IDataSetParams): Promise<IDataSet>;
|
|
11
|
+
getDatasetsIdVersions(id: string, pageNo: number, pageSize: number): Promise<Paged<IVersion>>;
|
|
12
|
+
getDatasetsIdVersionsVidNextno(id: string): Promise<{
|
|
13
|
+
no: string;
|
|
14
|
+
}>;
|
|
15
|
+
getS3Iam(datasetId: string, publicBucket?: boolean): Promise<IAM>;
|
|
16
|
+
postDatasetsIdVersions(id: string, params: any): Promise<any>;
|
|
17
|
+
patchDatasetsIdVersionsVid(id: string, vid: string, params: {
|
|
18
|
+
description?: string;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
getDatasetsIdVersionsVid(id: string, vid: string): Promise<IVersion>;
|
|
21
|
+
delDatasetsIdVersionsVid(id: string, vid: string): Promise<IVersion>;
|
|
22
|
+
getDatasetsIdVersionsNo(id: string, params?: {
|
|
23
|
+
queryUnsupervised?: boolean;
|
|
24
|
+
querySupervised?: boolean;
|
|
25
|
+
}): Promise<IVersion[]>;
|
|
26
|
+
listDatasetsIdLabels(id: string, params: PageQueryParams): Promise<Paged<ILabelList>>;
|
|
27
|
+
getDatasetsIdVersionsVidLabelcount(id: string, vid: string, params?: {
|
|
28
|
+
label?: "allcode" | string;
|
|
29
|
+
searchName?: string;
|
|
30
|
+
}): Promise<ILabel[]>;
|
|
31
|
+
getDatasetsIdVersionsVidSamples(id: string, vid: string, params: SampleQueryParams): Promise<Paged<ISample>>;
|
|
32
|
+
updateSamples(datasetId: string, vid: string, samples: ISample[] | ISampleTextParams[] | ISampleFileParams[], confirmStatus?: number): Promise<string[]>;
|
|
33
|
+
delDatasetsIdVersionsVidSamplesId(id: string, vid: string, sid: string): Promise<string[]>;
|
|
34
|
+
delDatasetsIdVersionsVidLlmSamplesId(id: string, vid: string, sid: string): Promise<string[]>;
|
|
35
|
+
getDatasetsIdVersionsVidSsamplesSid(id: string, vid: string, sid: string): Promise<{
|
|
36
|
+
labels: {
|
|
37
|
+
uuid: string;
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
box: any;
|
|
41
|
+
shapeType?: string | undefined;
|
|
42
|
+
type?: string | undefined;
|
|
43
|
+
catagoryId?: string | undefined;
|
|
44
|
+
words?: string | undefined;
|
|
45
|
+
cell?: {
|
|
46
|
+
rowIdx: number;
|
|
47
|
+
colIdx: number;
|
|
48
|
+
rowSpan: number;
|
|
49
|
+
colSpan: number;
|
|
50
|
+
} | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
id: string;
|
|
53
|
+
versionId: string;
|
|
54
|
+
fileUrl: string;
|
|
55
|
+
fileKey: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
creator: string;
|
|
59
|
+
modifier: string;
|
|
60
|
+
ocrJson: any;
|
|
61
|
+
textContent: import('./model').ITextContent;
|
|
62
|
+
fileName: string;
|
|
63
|
+
charactersCount: number;
|
|
64
|
+
fileSize: number;
|
|
65
|
+
statusSubsection: import('./model').SubsectionStatus;
|
|
66
|
+
countSubsection: number;
|
|
67
|
+
recordId: string;
|
|
68
|
+
metadata?: {
|
|
69
|
+
charactersCount?: string | undefined;
|
|
70
|
+
originKey?: string | undefined;
|
|
71
|
+
fileName: string;
|
|
72
|
+
oriUrl: string;
|
|
73
|
+
} | undefined;
|
|
74
|
+
sampleFileName: {
|
|
75
|
+
name: string;
|
|
76
|
+
oriSize: number;
|
|
77
|
+
originalName: string;
|
|
78
|
+
};
|
|
79
|
+
operator: import('./model').IOperator;
|
|
80
|
+
confirmStatus?: number | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
getImportInfo(): Promise<{
|
|
83
|
+
token: string;
|
|
84
|
+
}>;
|
|
85
|
+
getOptionsMarkType(): Promise<IMarkType[]>;
|
|
86
|
+
getOptionsOcrMarkTmpl(): Promise<IMarkType[]>;
|
|
87
|
+
getOptionsLlmMarkTmpl(): Promise<IMarkType[]>;
|
|
88
|
+
getOptionsLlmResponseSort(): Promise<IMarkType[]>;
|
|
89
|
+
getOptionsImgproxy(): Promise<IProxy>;
|
|
90
|
+
getDeduplication(md5s: string[], datasetId: string): Promise<Deduplication>;
|
|
91
|
+
postDatasetsIdVersionsVidSamples(id: string, vid: string, params: sampleParams): Promise<string[]>;
|
|
92
|
+
patchDatasetsIdVersionsVidSamples(id: string, vid: string, params: sampleParams): Promise<{
|
|
93
|
+
data: string[];
|
|
94
|
+
}>;
|
|
95
|
+
listCategory(datasetId: string): Promise<Category[]>;
|
|
96
|
+
postCategory(datasetId: string, name: string): Promise<Category>;
|
|
97
|
+
updateCategory(datasetId: string, id: string, name: string): Promise<Category>;
|
|
98
|
+
deleteCategory(datasetId: string, id: string): Promise<Category>;
|
|
99
|
+
postDatasetIdVersionIdFilesDeduplication(id: string, vid: string, params: {
|
|
100
|
+
names?: string[];
|
|
101
|
+
md5sum?: string[];
|
|
102
|
+
}): Promise<Deduplication>;
|
|
103
|
+
postDatasetIdVersionIdLlmSamples(id: string, vid: string, params: ILlmSamplePostParams): Promise<ILlmSample[]>;
|
|
104
|
+
patchDatasetIdVersionIdLlmSampleId(id: string, vid: string, sid: string, params: ILlmSamplePostParams): Promise<ILlmSample[]>;
|
|
105
|
+
postLlmSamplesSubsection(id: string, vid: string, params: ISubsectionParams): Promise<ISubsectionSample[]>;
|
|
106
|
+
generatellmSamplesSubsection(datasetId: string, versionId: string, params: {
|
|
107
|
+
fileUrls: string[];
|
|
108
|
+
regex: string;
|
|
109
|
+
sampleId: string;
|
|
110
|
+
}): Promise<{
|
|
111
|
+
url: string;
|
|
112
|
+
message: string;
|
|
113
|
+
isSuccess: boolean;
|
|
114
|
+
}[]>;
|
|
115
|
+
listSubsection(datasetId: string, versionId: string, sampleId: string, params: PageQueryParams): Promise<Paged<ILlmSampleSubsection>>;
|
|
116
|
+
postSubsection(datasetId: string, versionId: string, sampleId: string, params: {
|
|
117
|
+
content: string;
|
|
118
|
+
sectionNo: number;
|
|
119
|
+
addDirect: "up" | "down";
|
|
120
|
+
additionInfo?: {
|
|
121
|
+
key: string;
|
|
122
|
+
value: string;
|
|
123
|
+
sort: number;
|
|
124
|
+
}[];
|
|
125
|
+
}): Promise<ILlmSampleSubsection>;
|
|
126
|
+
updateSubsection(datasetId: string, versionId: string, sampleId: string, subsectionId: string, params: {
|
|
127
|
+
content?: string;
|
|
128
|
+
additionInfo?: Addition[];
|
|
129
|
+
}): Promise<ILlmSampleSubsection>;
|
|
130
|
+
deleteSubsection(datasetId: string, versionId: string, sampleId: string, subsectionId: string): Promise<ILlmSampleSubsection>;
|
|
131
|
+
llmSupervisedRecordGenerate(params: GenerateParams): Promise<string>;
|
|
132
|
+
llmSupervisedRecordAbordTask(params: {
|
|
133
|
+
rid: string;
|
|
134
|
+
}): Promise<string>;
|
|
135
|
+
llmSupervisedRecordPauseTask(params: {
|
|
136
|
+
rid: string;
|
|
137
|
+
}): Promise<string>;
|
|
138
|
+
getLlmSupervisedRecord(id: string): Promise<GenerateRecord>;
|
|
139
|
+
getDatasetsIdVersionsIdLlmSamplesV2(datasetId: string, versionId: string, params: ILlmSampleV2ListParams): Promise<Paged<ILlmSampleV2>>;
|
|
140
|
+
postDatasetsIdVersionsIdLlmSamplesV2(datasetId: string, versionId: string, params: {
|
|
141
|
+
content?: ILlmContent[];
|
|
142
|
+
annotations?: {
|
|
143
|
+
document?: string;
|
|
144
|
+
};
|
|
145
|
+
fileUrls?: string[];
|
|
146
|
+
}): Promise<IPostLlmSampleV2>;
|
|
147
|
+
getDatasetsIdVersionsIdLlmSamplesV2Sid(datasetId: string, versionId: string, sampleId: string): Promise<ILlmSampleV2>;
|
|
148
|
+
patchDatasetsIdVersionsIdLlmSamplesV2Sid(datasetId: string, versionId: string, sampleId: string, params: {
|
|
149
|
+
content: ILlmContent[];
|
|
150
|
+
annotations: {
|
|
151
|
+
document?: string;
|
|
152
|
+
};
|
|
153
|
+
}): Promise<ILlmSampleV2>;
|
|
154
|
+
delDatasetsIdVersionsIdLlmSamplesV2Sid(datasetId: string, versionId: string, sampleId: string): Promise<ILlmSampleV2>;
|
|
155
|
+
getDatasetsIdVersionsIdExportLLMSamples(id: string, vid: string): Promise<import('axios').AxiosResponse<Blob, any> | undefined>;
|
|
156
|
+
llmSamplesSubsectionView(datasetId: string, versionId: string, sampleId: string, params: {
|
|
157
|
+
regex: string;
|
|
158
|
+
}): Promise<string[]>;
|
|
159
|
+
listLabels(datasetId: string, params: PageQueryParams): Promise<Paged<Label>>;
|
|
160
|
+
postLabels(datasetId: string, params: CreateLabelParams): Promise<string[]>;
|
|
161
|
+
patchLabel(datasetId: string, labelId: string, params: EditLabelParams): Promise<Label>;
|
|
162
|
+
deleteLabel(datasetId: string, labelId: string): Promise<Label>;
|
|
163
|
+
postUploadPicsZip(id: string, vid: string, params: {
|
|
164
|
+
zipUrls: string[];
|
|
165
|
+
type?: number;
|
|
166
|
+
}): Promise<any>;
|
|
167
|
+
checkFileResult(id: string, vid: string, params: {
|
|
168
|
+
taskId: string;
|
|
169
|
+
}, interval?: number, onProgress?: (progress: number) => void): Promise<string | null>;
|
|
170
|
+
getUploadPicsZipResult(id: string, vid: string, params?: {
|
|
171
|
+
taskId: string;
|
|
172
|
+
}): Promise<IPicsZipResult>;
|
|
173
|
+
getUploadabort(id: string, vid: string, params: {
|
|
174
|
+
taskId: string;
|
|
175
|
+
}): Promise<IPicsZipResult>;
|
|
176
|
+
postPreLabelTask(id: string, vid: string, params: IPrelabelTaskParams): Promise<string>;
|
|
177
|
+
getPreLabelTask(id: string, vid: string): Promise<IPreLabelTask[]>;
|
|
178
|
+
delPreLabelTask(id: string, vid: string, tid: string): Promise<unknown>;
|
|
179
|
+
getAllConfirmSamples(id: string, vid: string): Promise<unknown>;
|
|
180
|
+
getDataSetCopyTask(id: string, vid: string): Promise<IDataSetCoptTask>;
|
|
181
|
+
postDataSetCopyTask(id: string, vid: string, params: IDataSetCoptTaskParams): Promise<unknown>;
|
|
182
|
+
deleteDatasetCopyTask(id: string, vid: string, params: {
|
|
183
|
+
taskId: string;
|
|
184
|
+
}): Promise<unknown>;
|
|
185
|
+
}
|
|
186
|
+
export * from './model';
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { PageQueryParams } from '../base';
|
|
2
|
+
import { ISessionPrompt } from '../cvforce/model';
|
|
3
|
+
export interface IDataSetResult {
|
|
4
|
+
pageNo: number;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
numResults: number;
|
|
7
|
+
totalResults: number;
|
|
8
|
+
recordList: IDataSet[];
|
|
9
|
+
}
|
|
10
|
+
export interface IDataSet {
|
|
11
|
+
createdAt: string;
|
|
12
|
+
creator: string;
|
|
13
|
+
deletedAt: string;
|
|
14
|
+
description: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
id: string;
|
|
17
|
+
markType: string;
|
|
18
|
+
name: string;
|
|
19
|
+
org: string;
|
|
20
|
+
tenantCode: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
ocrMarkTmpl: "StructKVCOCR" | "BasicOCR" | "TableOCR" | "DetectionOCR";
|
|
23
|
+
llmMarkTmpl: string;
|
|
24
|
+
llmResponseSort: string;
|
|
25
|
+
operator: IOperator;
|
|
26
|
+
level: number;
|
|
27
|
+
}
|
|
28
|
+
export interface IOperator {
|
|
29
|
+
creatorName: string;
|
|
30
|
+
creatorUserName: string;
|
|
31
|
+
updaterName: string;
|
|
32
|
+
updaterUserName: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ISegment {
|
|
35
|
+
segment_id: number;
|
|
36
|
+
segment_name: string;
|
|
37
|
+
segment_describe: string;
|
|
38
|
+
file_num: number;
|
|
39
|
+
label_list: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface IDataSetParams {
|
|
42
|
+
name?: string;
|
|
43
|
+
markType?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
icon?: string;
|
|
46
|
+
level?: number;
|
|
47
|
+
}
|
|
48
|
+
export interface IVersion {
|
|
49
|
+
id: string;
|
|
50
|
+
datasetId: string;
|
|
51
|
+
samplesSizeKb: number;
|
|
52
|
+
samplesCount: number;
|
|
53
|
+
no: string;
|
|
54
|
+
parentId: string;
|
|
55
|
+
description: string;
|
|
56
|
+
freezeHistory: boolean;
|
|
57
|
+
creator: string;
|
|
58
|
+
createdAt: number;
|
|
59
|
+
updatedAt: number;
|
|
60
|
+
modifier: string;
|
|
61
|
+
existLabelSam?: boolean;
|
|
62
|
+
subsectionCount: number;
|
|
63
|
+
subsectionFiles: string[];
|
|
64
|
+
unSubsectionFiles: string[];
|
|
65
|
+
effectSamCount: number;
|
|
66
|
+
versionAsyncTask: IPicsZipResult;
|
|
67
|
+
}
|
|
68
|
+
export interface IAM {
|
|
69
|
+
endpoints: string[];
|
|
70
|
+
accessKey: string;
|
|
71
|
+
secretKey: string;
|
|
72
|
+
bucket: string;
|
|
73
|
+
prefix: string;
|
|
74
|
+
region: string;
|
|
75
|
+
expiredAt: number;
|
|
76
|
+
useSSL: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface IVersionParam {
|
|
79
|
+
no: string;
|
|
80
|
+
parentId: string;
|
|
81
|
+
description: string;
|
|
82
|
+
freezeHistory: boolean;
|
|
83
|
+
creator: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ILabel {
|
|
86
|
+
label: string;
|
|
87
|
+
count: number;
|
|
88
|
+
id: string;
|
|
89
|
+
color: string;
|
|
90
|
+
threshold?: number;
|
|
91
|
+
}
|
|
92
|
+
export interface Label {
|
|
93
|
+
id: string;
|
|
94
|
+
label: string;
|
|
95
|
+
color: string;
|
|
96
|
+
createdAt: number;
|
|
97
|
+
updatedAt: number;
|
|
98
|
+
}
|
|
99
|
+
export interface EditLabelParams {
|
|
100
|
+
label: string;
|
|
101
|
+
}
|
|
102
|
+
export interface CreateLabelParams {
|
|
103
|
+
labels: EditLabelParams[];
|
|
104
|
+
}
|
|
105
|
+
export interface ITextContent {
|
|
106
|
+
instruction: string;
|
|
107
|
+
input: string;
|
|
108
|
+
output: string;
|
|
109
|
+
uuid?: string;
|
|
110
|
+
}
|
|
111
|
+
export declare enum SubsectionStatus {
|
|
112
|
+
inital = 0,
|
|
113
|
+
success = 1,
|
|
114
|
+
processing = 2,
|
|
115
|
+
failed = 3
|
|
116
|
+
}
|
|
117
|
+
export interface ISample {
|
|
118
|
+
id: string;
|
|
119
|
+
versionId: string;
|
|
120
|
+
fileUrl: string;
|
|
121
|
+
labels: TInfer[];
|
|
122
|
+
fileKey: string;
|
|
123
|
+
createdAt: string;
|
|
124
|
+
updatedAt: string;
|
|
125
|
+
creator: string;
|
|
126
|
+
modifier: string;
|
|
127
|
+
ocrJson: any;
|
|
128
|
+
textContent: ITextContent;
|
|
129
|
+
fileName: string;
|
|
130
|
+
charactersCount: number;
|
|
131
|
+
fileSize: number;
|
|
132
|
+
statusSubsection: SubsectionStatus;
|
|
133
|
+
countSubsection: number;
|
|
134
|
+
recordId: string;
|
|
135
|
+
metadata?: {
|
|
136
|
+
charactersCount?: string;
|
|
137
|
+
originKey?: string;
|
|
138
|
+
fileName: string;
|
|
139
|
+
oriUrl: string;
|
|
140
|
+
};
|
|
141
|
+
sampleFileName: {
|
|
142
|
+
name: string;
|
|
143
|
+
oriSize: number;
|
|
144
|
+
originalName: string;
|
|
145
|
+
};
|
|
146
|
+
operator: IOperator;
|
|
147
|
+
confirmStatus?: number;
|
|
148
|
+
}
|
|
149
|
+
export interface sampleParams {
|
|
150
|
+
samples: SampleSigleParams | SampleSigleParams[] | ISampleTextParams[] | sampleFileParams[];
|
|
151
|
+
confirmStatus?: number;
|
|
152
|
+
}
|
|
153
|
+
export interface TInferBase {
|
|
154
|
+
id: string;
|
|
155
|
+
label?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface SampleSigleParams {
|
|
158
|
+
labels: TInferBase[];
|
|
159
|
+
fileKey: string;
|
|
160
|
+
sampleFileName?: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export interface sampleFileParams {
|
|
165
|
+
fileKey: string;
|
|
166
|
+
sampleFileName?: {
|
|
167
|
+
name: string;
|
|
168
|
+
};
|
|
169
|
+
fileSize: number;
|
|
170
|
+
}
|
|
171
|
+
export interface ISampleTextParams {
|
|
172
|
+
id?: string;
|
|
173
|
+
textContent: ITextContent;
|
|
174
|
+
}
|
|
175
|
+
export interface ISampleFileParams {
|
|
176
|
+
id?: string;
|
|
177
|
+
sampleFileName?: {
|
|
178
|
+
name: string;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
export interface IMarkType {
|
|
182
|
+
key: string;
|
|
183
|
+
name: string;
|
|
184
|
+
icon?: string;
|
|
185
|
+
sort: number;
|
|
186
|
+
}
|
|
187
|
+
export interface IProxy {
|
|
188
|
+
key: string;
|
|
189
|
+
salt: string;
|
|
190
|
+
prefix: string;
|
|
191
|
+
}
|
|
192
|
+
export interface TInfer {
|
|
193
|
+
id: string;
|
|
194
|
+
label: string;
|
|
195
|
+
box: any;
|
|
196
|
+
shapeType?: string;
|
|
197
|
+
uuid?: string;
|
|
198
|
+
type?: string;
|
|
199
|
+
catagoryId?: string;
|
|
200
|
+
words?: string;
|
|
201
|
+
cell?: {
|
|
202
|
+
rowIdx: number;
|
|
203
|
+
colIdx: number;
|
|
204
|
+
rowSpan: number;
|
|
205
|
+
colSpan: number;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
export interface Deduplication {
|
|
209
|
+
duplicated: string[];
|
|
210
|
+
unduplicated: string[];
|
|
211
|
+
duplicatedDS: string[];
|
|
212
|
+
duplicatedMd5: string[];
|
|
213
|
+
}
|
|
214
|
+
export interface Category {
|
|
215
|
+
id: string;
|
|
216
|
+
name: string;
|
|
217
|
+
createdAt?: number;
|
|
218
|
+
updatedAt?: number;
|
|
219
|
+
}
|
|
220
|
+
export interface ILlmSamplePostParams {
|
|
221
|
+
fileUrls?: string[];
|
|
222
|
+
markTmpl?: string;
|
|
223
|
+
fileSizes?: number[];
|
|
224
|
+
fileName?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface ILlmSamplePatchParams {
|
|
227
|
+
size?: number;
|
|
228
|
+
count?: number;
|
|
229
|
+
fileName?: string;
|
|
230
|
+
}
|
|
231
|
+
export interface ILlmSample {
|
|
232
|
+
id: string;
|
|
233
|
+
fileName: string;
|
|
234
|
+
success: number;
|
|
235
|
+
fail: number;
|
|
236
|
+
repetition: number;
|
|
237
|
+
maxLengthLlm: number;
|
|
238
|
+
}
|
|
239
|
+
export interface Addition {
|
|
240
|
+
key: string;
|
|
241
|
+
value: string;
|
|
242
|
+
sort: number;
|
|
243
|
+
}
|
|
244
|
+
export interface ILlmSampleSubsection {
|
|
245
|
+
id: string;
|
|
246
|
+
content: string;
|
|
247
|
+
sectionNo: number;
|
|
248
|
+
additionInfo?: Addition[];
|
|
249
|
+
}
|
|
250
|
+
export interface ISubsectionParams {
|
|
251
|
+
fileUrls?: string[];
|
|
252
|
+
regex: string;
|
|
253
|
+
sampleId?: string;
|
|
254
|
+
}
|
|
255
|
+
export interface ISubsectionSample {
|
|
256
|
+
url: string;
|
|
257
|
+
message: string;
|
|
258
|
+
isSuccess: boolean;
|
|
259
|
+
}
|
|
260
|
+
export interface GenerateParams {
|
|
261
|
+
newDatasetId: string;
|
|
262
|
+
newVersionId: string;
|
|
263
|
+
oldDatasetId: string;
|
|
264
|
+
oldVersionId: string;
|
|
265
|
+
oldSampleId: string;
|
|
266
|
+
oldRecordId?: string;
|
|
267
|
+
promptVariables?: ISessionPrompt[];
|
|
268
|
+
application?: ISimpleApp;
|
|
269
|
+
resourceToken?: string;
|
|
270
|
+
}
|
|
271
|
+
export interface GenerateRecord {
|
|
272
|
+
id: string;
|
|
273
|
+
oldDatasetId: string;
|
|
274
|
+
oldVersionId: string;
|
|
275
|
+
oldSampleId: string;
|
|
276
|
+
newDatasetId: string;
|
|
277
|
+
newVersionId: string;
|
|
278
|
+
newSampleId: string;
|
|
279
|
+
status: number;
|
|
280
|
+
message: string;
|
|
281
|
+
sectionCount: number;
|
|
282
|
+
qaCount: number;
|
|
283
|
+
taskId: string;
|
|
284
|
+
allSectionCount: number;
|
|
285
|
+
promptVariables: ISessionPrompt[];
|
|
286
|
+
application: ISimpleApp;
|
|
287
|
+
}
|
|
288
|
+
export declare enum GenerateStatus {
|
|
289
|
+
inital = 0,
|
|
290
|
+
processing = 1,
|
|
291
|
+
paused = 2,
|
|
292
|
+
failed = 3,
|
|
293
|
+
done = 4
|
|
294
|
+
}
|
|
295
|
+
export interface ILlmSampleV2ListParams {
|
|
296
|
+
labels: string;
|
|
297
|
+
pageNo: number;
|
|
298
|
+
pageSize: number;
|
|
299
|
+
}
|
|
300
|
+
export interface ILlmSampleV2PostParams {
|
|
301
|
+
fileUrls?: string[];
|
|
302
|
+
content?: ILlmContent[];
|
|
303
|
+
}
|
|
304
|
+
export interface ILlmContent {
|
|
305
|
+
prompt: string;
|
|
306
|
+
response: string[][];
|
|
307
|
+
}
|
|
308
|
+
export interface ILlmSampleV2 {
|
|
309
|
+
id: string;
|
|
310
|
+
versionId: string;
|
|
311
|
+
md5Sum: string;
|
|
312
|
+
labels: {
|
|
313
|
+
creator: string;
|
|
314
|
+
import: string;
|
|
315
|
+
mark: boolean;
|
|
316
|
+
};
|
|
317
|
+
annotations: {
|
|
318
|
+
document: string;
|
|
319
|
+
file: string;
|
|
320
|
+
lineNo: number;
|
|
321
|
+
};
|
|
322
|
+
content: ILlmContent[];
|
|
323
|
+
createdAt: string;
|
|
324
|
+
updatedAt: string;
|
|
325
|
+
deletedAt: string;
|
|
326
|
+
creator: string;
|
|
327
|
+
updater: string;
|
|
328
|
+
}
|
|
329
|
+
export interface IPostLlmSampleV2 {
|
|
330
|
+
id: string;
|
|
331
|
+
success: number;
|
|
332
|
+
fail: number;
|
|
333
|
+
repetition: number;
|
|
334
|
+
maxLengthLlm: number;
|
|
335
|
+
failFile: string;
|
|
336
|
+
}
|
|
337
|
+
export interface ISimpleApp {
|
|
338
|
+
id: string;
|
|
339
|
+
name: string;
|
|
340
|
+
appType?: string;
|
|
341
|
+
}
|
|
342
|
+
export interface SampleQueryParams extends PageQueryParams {
|
|
343
|
+
labels?: string | string[];
|
|
344
|
+
confirmStatus?: number;
|
|
345
|
+
searchName?: string;
|
|
346
|
+
}
|
|
347
|
+
export interface ILabelList {
|
|
348
|
+
id: string;
|
|
349
|
+
label: string;
|
|
350
|
+
datasetId: string;
|
|
351
|
+
createdAt: string;
|
|
352
|
+
updatedAt: string;
|
|
353
|
+
deletedAt: string;
|
|
354
|
+
creator: string;
|
|
355
|
+
}
|
|
356
|
+
export interface IPicsZipResult {
|
|
357
|
+
taskId: string;
|
|
358
|
+
state: string;
|
|
359
|
+
lastTaskResult: string;
|
|
360
|
+
zipUrls: string;
|
|
361
|
+
process: number;
|
|
362
|
+
type: number;
|
|
363
|
+
versionId: string;
|
|
364
|
+
}
|
|
365
|
+
export interface ILastResult {
|
|
366
|
+
count: number;
|
|
367
|
+
failedCount: number;
|
|
368
|
+
repeatCount: number;
|
|
369
|
+
successCount: number;
|
|
370
|
+
formatErrorCount: number;
|
|
371
|
+
}
|
|
372
|
+
export declare enum UploadZipsStatus {
|
|
373
|
+
Pending = "PENDING",//等待处理
|
|
374
|
+
Started = "STARTED",//处理中
|
|
375
|
+
Failure = "FAILURE",//处理失败
|
|
376
|
+
Success = "SUCCESS",//处理成功
|
|
377
|
+
Abort = "ABORT"
|
|
378
|
+
}
|
|
379
|
+
export interface IPrelabelTaskParams {
|
|
380
|
+
serviceId: string;
|
|
381
|
+
serviceName: string;
|
|
382
|
+
data: string;
|
|
383
|
+
confidence: number;
|
|
384
|
+
}
|
|
385
|
+
export interface IPreLabelTask {
|
|
386
|
+
taskId: string;
|
|
387
|
+
state: string;
|
|
388
|
+
lastTaskResult: string;
|
|
389
|
+
process: number;
|
|
390
|
+
type: number;
|
|
391
|
+
params: IPrelabelTaskParams;
|
|
392
|
+
}
|
|
393
|
+
export declare enum PreLabelTaskStatus {
|
|
394
|
+
Pending = "PENDING",//等待处理
|
|
395
|
+
Started = "STARTED",//处理中
|
|
396
|
+
Success = "SUCCESS",//处理成功
|
|
397
|
+
Failure = "FAILURE "
|
|
398
|
+
}
|
|
399
|
+
export declare enum IDatasetLevel {
|
|
400
|
+
all = 0,
|
|
401
|
+
general = 1,
|
|
402
|
+
major = 2
|
|
403
|
+
}
|
|
404
|
+
export interface IGetDatasetParams {
|
|
405
|
+
name?: string;
|
|
406
|
+
pageNo: number;
|
|
407
|
+
pageSize: number;
|
|
408
|
+
markType?: string;
|
|
409
|
+
subMarkTmpl?: string;
|
|
410
|
+
llmResponseSort?: string;
|
|
411
|
+
creator?: string;
|
|
412
|
+
markTypeArr?: string[];
|
|
413
|
+
level?: number;
|
|
414
|
+
}
|
|
415
|
+
export interface IDataSetCoptTaskParams {
|
|
416
|
+
targetDsType: string;
|
|
417
|
+
newDsName?: string;
|
|
418
|
+
newDsDescription?: string;
|
|
419
|
+
existDsId?: string;
|
|
420
|
+
existVerId?: string;
|
|
421
|
+
}
|
|
422
|
+
export interface IDataSetCoptTask {
|
|
423
|
+
task_id: string;
|
|
424
|
+
state: PreLabelTaskStatus;
|
|
425
|
+
params: {
|
|
426
|
+
targetDsType: string;
|
|
427
|
+
newDsName: string;
|
|
428
|
+
newDsDescription: string;
|
|
429
|
+
existDsId: string;
|
|
430
|
+
existVerId: string;
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
export interface IPagination {
|
|
434
|
+
current: number;
|
|
435
|
+
pageSize: number;
|
|
436
|
+
total?: number;
|
|
437
|
+
type?: string;
|
|
438
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { IModelService, IServiceParams, IServiceQueryParams, ISign } from './model';
|
|
3
|
+
import { ApiErrorHandler, BaseApi, PageQueryParams } from '../base';
|
|
4
|
+
export declare class ModelServiceApi extends BaseApi {
|
|
5
|
+
constructor(axiosInstance?: AxiosInstance, errorHandler?: ApiErrorHandler);
|
|
6
|
+
listModelServices(params: PageQueryParams & IServiceQueryParams): Promise<import('../base').Paged<IModelService>>;
|
|
7
|
+
postModelService(params: IServiceParams): Promise<string>;
|
|
8
|
+
getModelServiceById(id: string): Promise<IModelService>;
|
|
9
|
+
patchModelServiceById(id: string, activeTime: string): Promise<unknown>;
|
|
10
|
+
deleteModelService(serviceId: string): Promise<unknown>;
|
|
11
|
+
getEnableModelService(id: string): Promise<unknown>;
|
|
12
|
+
getDisableModelService(id: string): Promise<unknown>;
|
|
13
|
+
getModelServiceList(id: string): Promise<unknown>;
|
|
14
|
+
getModelServiceDelist(id: string): Promise<unknown>;
|
|
15
|
+
importService(params: IServiceParams): Promise<string>;
|
|
16
|
+
patchModelService(id: string, params: IServiceParams): Promise<unknown>;
|
|
17
|
+
openModelServices(params: IServiceQueryParams): Promise<IModelService[]>;
|
|
18
|
+
importMirronService(params: IServiceParams): Promise<string>;
|
|
19
|
+
patchMirronService(id: string, params: IServiceParams): Promise<unknown>;
|
|
20
|
+
getServiceSignList(params?: {
|
|
21
|
+
signName: string;
|
|
22
|
+
}): Promise<ISign[]>;
|
|
23
|
+
}
|