@glodon-aiot/apis 3.0.10-beta.0 → 3.0.10-beta.1
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.
|
@@ -31,11 +31,11 @@ import { BaseApi as O } from "../base/index.mjs";
|
|
|
31
31
|
import { initMinio as v, putObjectBuffer as C } from "@glodon-aiot/minio";
|
|
32
32
|
import { IHistoryRole as $, AecKnowledgeFileStatus as k } from "./model.mjs";
|
|
33
33
|
import { IFileOrigin as V, ISourceType as W, IThinkingStatus as X, IversionInfo as q } from "./model.mjs";
|
|
34
|
-
import { fetchEventSource as R } from "../utils/fetchEventSource/fetch.mjs";
|
|
35
34
|
import H from "dayjs";
|
|
36
35
|
import { PROMPT_SEARCH_MAX_LENGTH as Q } from "./cosntant.mjs";
|
|
37
36
|
import { PROMPT_TITLE_MAX_LENGTH as ee } from "./cosntant.mjs";
|
|
38
|
-
import
|
|
37
|
+
import R from "../node_modules/uuid/dist/esm-browser/v4.mjs";
|
|
38
|
+
import { fetchEventSource as w } from "../utils/fetchEventSource/fetch.mjs";
|
|
39
39
|
class Y extends O {
|
|
40
40
|
constructor(e, t, o) {
|
|
41
41
|
super(e != null ? e : F.create(), o), this.axiosInstance = e, this.getToken = t;
|
|
@@ -268,7 +268,7 @@ class Y extends O {
|
|
|
268
268
|
var i;
|
|
269
269
|
const s = {
|
|
270
270
|
code: 0,
|
|
271
|
-
messageId:
|
|
271
|
+
messageId: R(),
|
|
272
272
|
content: "",
|
|
273
273
|
role: $.Robot,
|
|
274
274
|
sessionId: "",
|
|
@@ -283,7 +283,7 @@ class Y extends O {
|
|
|
283
283
|
}, h = yield this.getToken(), g = S(f({}, t), {
|
|
284
284
|
stream: !0
|
|
285
285
|
});
|
|
286
|
-
|
|
286
|
+
w(`${(i = this.axiosInstance) == null ? void 0 : i.defaults.baseURL}/chat?sessionId=${e}`, {
|
|
287
287
|
method: "POST",
|
|
288
288
|
headers: {
|
|
289
289
|
Authorization: `Bearer ${h}`,
|
|
@@ -364,7 +364,7 @@ class Y extends O {
|
|
|
364
364
|
var i, a;
|
|
365
365
|
const s = {
|
|
366
366
|
code: 0,
|
|
367
|
-
messageId:
|
|
367
|
+
messageId: R(),
|
|
368
368
|
content: "",
|
|
369
369
|
role: $.Robot,
|
|
370
370
|
sessionId: "",
|
|
@@ -382,7 +382,7 @@ class Y extends O {
|
|
|
382
382
|
}, h = yield this.getToken(), g = S(f({}, t), {
|
|
383
383
|
stream: !0
|
|
384
384
|
});
|
|
385
|
-
|
|
385
|
+
w(`${(a = (i = this.axiosInstance) == null ? void 0 : i.defaults.baseURL) == null ? void 0 : a.replace("/v1", "/v3")}/chat?sessionId=${e}`, {
|
|
386
386
|
method: "POST",
|
|
387
387
|
headers: {
|
|
388
388
|
Authorization: `Bearer ${h}`,
|
|
@@ -30,12 +30,12 @@ import K from "axios";
|
|
|
30
30
|
import { BaseApi as T } from "../base/index.mjs";
|
|
31
31
|
import { initMinio as b, putObjectBuffer as P } from "@glodon-aiot/minio";
|
|
32
32
|
import { IHistoryRole as k, AecKnowledgeFileStatus as I } from "../aecpilot/model.mjs";
|
|
33
|
-
import
|
|
34
|
-
import F from "
|
|
35
|
-
import {
|
|
36
|
-
import
|
|
37
|
-
import E from "../
|
|
38
|
-
globalThis.Buffer =
|
|
33
|
+
import M from "dayjs";
|
|
34
|
+
import { Buffer as F } from "buffer";
|
|
35
|
+
import { PROMPT_SEARCH_MAX_LENGTH as B } from "../aecpilot/cosntant.mjs";
|
|
36
|
+
import H from "../node_modules/uuid/dist/esm-browser/v4.mjs";
|
|
37
|
+
import { fetchEventSource as E } from "../utils/fetchEventSource/fetch.mjs";
|
|
38
|
+
globalThis.Buffer = F;
|
|
39
39
|
class J extends T {
|
|
40
40
|
constructor(e, t, a) {
|
|
41
41
|
super(e != null ? e : K.create(), a), this.axiosInstance = e, this.getToken = t;
|
|
@@ -349,7 +349,7 @@ class J extends T {
|
|
|
349
349
|
}
|
|
350
350
|
listPrompt(e, t) {
|
|
351
351
|
return s(this, null, function* () {
|
|
352
|
-
return t != null && t.title && t.title.length >
|
|
352
|
+
return t != null && t.title && t.title.length > B ? [] : this.get(`/data/v1/application/${e}/prompts`, t);
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
getPrompt(e, t) {
|
|
@@ -502,7 +502,7 @@ class J extends T {
|
|
|
502
502
|
var l;
|
|
503
503
|
const n = {
|
|
504
504
|
code: 0,
|
|
505
|
-
messageId:
|
|
505
|
+
messageId: H(),
|
|
506
506
|
content: "",
|
|
507
507
|
role: k.Robot,
|
|
508
508
|
sessionId: "",
|
|
@@ -518,7 +518,7 @@ class J extends T {
|
|
|
518
518
|
}, m = yield this.getToken(), d = $(y({}, a), {
|
|
519
519
|
stream: !0
|
|
520
520
|
});
|
|
521
|
-
|
|
521
|
+
E(`${(l = this.axiosInstance) == null ? void 0 : l.defaults.baseURL}/chat/v2/chat?applicationId=${e}&sessionId=${t}`, {
|
|
522
522
|
method: "POST",
|
|
523
523
|
headers: {
|
|
524
524
|
Authorization: `Bearer ${m}`,
|
|
@@ -547,7 +547,7 @@ class J extends T {
|
|
|
547
547
|
searchReference: n.searchReference,
|
|
548
548
|
messageId: n.messageId,
|
|
549
549
|
sessionId: t,
|
|
550
|
-
messageTime:
|
|
550
|
+
messageTime: M(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"),
|
|
551
551
|
comment: {
|
|
552
552
|
isAgree: 0
|
|
553
553
|
},
|
|
@@ -30,12 +30,12 @@ import T from "axios";
|
|
|
30
30
|
import { BaseApi as K } from "../base/index.mjs";
|
|
31
31
|
import { initMinio as k, putObjectBuffer as P } from "@glodon-aiot/minio";
|
|
32
32
|
import { IHistoryRole as F, AecKnowledgeFileStatus as I } from "../aecpilot/model.mjs";
|
|
33
|
-
import
|
|
34
|
-
import b from "
|
|
35
|
-
import
|
|
33
|
+
import M from "dayjs";
|
|
34
|
+
import { Buffer as b } from "buffer";
|
|
35
|
+
import B from "../node_modules/uuid/dist/esm-browser/v4.mjs";
|
|
36
36
|
import { PROMPT_SEARCH_MAX_LENGTH as E } from "../aecpilot/cosntant.mjs";
|
|
37
|
-
import H from "../
|
|
38
|
-
window.Buffer =
|
|
37
|
+
import { fetchEventSource as H } from "../utils/fetchEventSource/fetch.mjs";
|
|
38
|
+
window.Buffer = b;
|
|
39
39
|
class x extends K {
|
|
40
40
|
constructor(e, t, a) {
|
|
41
41
|
super(e != null ? e : T.create(), a), this.axiosInstance = e, this.getToken = t;
|
|
@@ -89,7 +89,7 @@ class x extends K {
|
|
|
89
89
|
return s(this, null, function* () {
|
|
90
90
|
const r = {
|
|
91
91
|
code: 0,
|
|
92
|
-
messageId:
|
|
92
|
+
messageId: B(),
|
|
93
93
|
content: "",
|
|
94
94
|
role: F.Robot,
|
|
95
95
|
sessionId: "",
|
|
@@ -104,7 +104,7 @@ class x extends K {
|
|
|
104
104
|
}, c = yield this.getToken(), p = $(y({}, a), {
|
|
105
105
|
stream: !0
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
H(`https://aiot-dev.glodon.com/api/cvforcepd/chat/v2/chat?applicationId=${e}&sessionId=${t}`, {
|
|
108
108
|
method: "POST",
|
|
109
109
|
headers: {
|
|
110
110
|
Authorization: `Bearer ${c}`,
|
|
@@ -131,7 +131,7 @@ class x extends K {
|
|
|
131
131
|
searchReference: r.searchReference,
|
|
132
132
|
messageId: r.messageId,
|
|
133
133
|
sessionId: t,
|
|
134
|
-
messageTime:
|
|
134
|
+
messageTime: M(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"),
|
|
135
135
|
comment: {
|
|
136
136
|
isAgree: 0
|
|
137
137
|
},
|
|
@@ -28,14 +28,10 @@ var a = (n, s, t) => new Promise((e, r) => {
|
|
|
28
28
|
});
|
|
29
29
|
import L from "axios";
|
|
30
30
|
import { UploadZipsStatus as u } from "./model.mjs";
|
|
31
|
-
import { GenerateStatus as
|
|
31
|
+
import { GenerateStatus as A, IDatasetLevel as F, PreLabelTaskStatus as N, SubsectionStatus as Z } from "./model.mjs";
|
|
32
32
|
import { BaseApi as k } from "../base/index.mjs";
|
|
33
|
-
import "@glodon-aiot/minio";
|
|
34
|
-
import "dayjs";
|
|
35
|
-
import "../agentcliui/index.mjs";
|
|
36
|
-
import "../aecpilotui/index.mjs";
|
|
37
33
|
import { getUuid as T } from "../utils/index.mjs";
|
|
38
|
-
class
|
|
34
|
+
class x extends k {
|
|
39
35
|
constructor(s, t) {
|
|
40
36
|
super(s != null ? s : L.create(), t);
|
|
41
37
|
}
|
|
@@ -426,10 +422,10 @@ class F extends k {
|
|
|
426
422
|
}
|
|
427
423
|
}
|
|
428
424
|
export {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
425
|
+
x as CVForceDatahubApi,
|
|
426
|
+
A as GenerateStatus,
|
|
427
|
+
F as IDatasetLevel,
|
|
428
|
+
N as PreLabelTaskStatus,
|
|
429
|
+
Z as SubsectionStatus,
|
|
434
430
|
u as UploadZipsStatus
|
|
435
431
|
};
|
package/dist/src/base/index.d.ts
CHANGED
|
@@ -38,4 +38,4 @@ export declare const needPrettifyMsg: (status: number) => boolean;
|
|
|
38
38
|
* @returns {string} 优化后的 message
|
|
39
39
|
*/
|
|
40
40
|
export declare const prettifyMsg: (status: number, message?: string) => string;
|
|
41
|
-
export
|
|
41
|
+
export type { AppResponse, Paged, PageQueryParams, CreateDataResponse } from './model';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type { User, LoginInfo, TRefreshToken } from './auth/model';
|
|
2
2
|
export * from './auth';
|
|
3
3
|
export type { AppResponse, Paged, PageQueryParams, CreateDataResponse, } from './base/model';
|
|
4
|
-
export
|
|
4
|
+
export { BaseApi, needPrettifyMsg, prettifyMsg } from './base';
|
|
5
|
+
export type { ApiErrorHandler } from './base';
|
|
5
6
|
export type { ITenant, IOrg, IMeta, IRegion, IUserInfo } from './user/model';
|
|
6
7
|
export * from './user';
|
|
7
8
|
export type { PointOfInterest, Config, RecordQueryParams, Point, GUICoords, PanoramaCoords, RecordCreateParams, Record, BindRecord, BindScene, RecordStatus, ViewToken, SpotType, Spot, HotSpot, RenderType, Scene, TrackType, TrackPoint, UploadStatus, PanoramaJWTPayload, ISpacetwinParams, IPoint, ISpacetwin, ISpacetwinStatus, IViewToken, IUploadTickets, } from './panorama/model';
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/apis",
|
|
3
|
-
"version": "3.0.10-beta.
|
|
3
|
+
"version": "3.0.10-beta.1",
|
|
4
4
|
"author": "glodoncv",
|
|
5
5
|
"description": "aiot apis",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"keywords": [
|
|
8
9
|
"aiot",
|
|
9
10
|
"aiot-apis"
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"registry": "https://registry.npmjs.org/"
|
|
78
79
|
},
|
|
79
80
|
"dependencies": {
|
|
80
|
-
"@glodon-aiot/minio": "0.1.6",
|
|
81
|
+
"@glodon-aiot/minio": "^0.1.6",
|
|
81
82
|
"axios": "0.24.0",
|
|
82
83
|
"dayjs": "^1.11.13"
|
|
83
84
|
}
|