@gooddata/sdk-backend-base 10.13.0-alpha.14 → 10.13.0-alpha.15
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/esm/dummyBackend/DummyGenAIChatThread.d.ts +16 -8
- package/esm/dummyBackend/DummyGenAIChatThread.d.ts.map +1 -1
- package/esm/dummyBackend/DummyGenAIChatThread.js +37 -11
- package/esm/dummyBackend/DummyGenAIChatThread.js.map +1 -1
- package/esm/sdk-backend-base.d.ts +7 -9
- package/package.json +5 -5
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { IChatThread } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { IGenAIChatEvaluation } from "@gooddata/sdk-model";
|
|
1
|
+
import { IChatThread, IChatThreadHistory, IChatThreadQuery, IGenAIChatEvaluation } from "@gooddata/sdk-backend-spi";
|
|
3
2
|
/**
|
|
4
|
-
* Dummy
|
|
3
|
+
* Dummy chat thread interface for testing.
|
|
5
4
|
* @internal
|
|
6
5
|
*/
|
|
7
6
|
export declare class DummyGenAIChatThread implements IChatThread {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
loadHistory(_fromInteractionId: number, { signal }: {
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}): Promise<IChatThreadHistory>;
|
|
10
|
+
reset(): Promise<void>;
|
|
11
|
+
query(_userMessage: string): IChatThreadQuery;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Dummy query builder for GenAI chat
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare class DummyGenAIChatQueryBuilder implements IChatThreadQuery {
|
|
18
|
+
withSearchLimit(): IChatThreadQuery;
|
|
19
|
+
withCreateLimit(): IChatThreadQuery;
|
|
20
|
+
withUserContext(): IChatThreadQuery;
|
|
13
21
|
query({ signal }: {
|
|
14
22
|
signal?: AbortSignal;
|
|
15
23
|
}): Promise<IGenAIChatEvaluation>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DummyGenAIChatThread.d.ts","sourceRoot":"","sources":["../../src/dummyBackend/DummyGenAIChatThread.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DummyGenAIChatThread.d.ts","sourceRoot":"","sources":["../../src/dummyBackend/DummyGenAIChatThread.ts"],"names":[],"mappings":"AACA,OAAO,EACH,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACvB,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,WAAW;IAC9C,WAAW,CACb,kBAAkB,EAAE,MAAM,EAC1B,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACrC,OAAO,CAAC,kBAAkB,CAAC;IAMxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAG5B,KAAK,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB;CAGhD;AAED;;;GAGG;AACH,qBAAa,0BAA2B,YAAW,gBAAgB;IAC/D,eAAe,IAAI,gBAAgB;IAInC,eAAe,IAAI,gBAAgB;IAInC,eAAe,IAAI,gBAAgB;IAI7B,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC;CAkBnF"}
|
|
@@ -1,28 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Dummy
|
|
2
|
+
* Dummy chat thread interface for testing.
|
|
3
3
|
* @internal
|
|
4
4
|
*/
|
|
5
5
|
export class DummyGenAIChatThread {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
async loadHistory(_fromInteractionId, { signal }) {
|
|
7
|
+
await cancellableTimeout(100, signal);
|
|
8
|
+
return Promise.resolve({
|
|
9
|
+
interactions: [],
|
|
10
|
+
});
|
|
8
11
|
}
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
async reset() {
|
|
13
|
+
await cancellableTimeout(100);
|
|
11
14
|
}
|
|
12
|
-
|
|
15
|
+
query(_userMessage) {
|
|
16
|
+
return new DummyGenAIChatQueryBuilder();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Dummy query builder for GenAI chat
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export class DummyGenAIChatQueryBuilder {
|
|
24
|
+
withSearchLimit() {
|
|
13
25
|
return this;
|
|
14
26
|
}
|
|
15
27
|
withCreateLimit() {
|
|
16
28
|
return this;
|
|
17
29
|
}
|
|
18
|
-
|
|
30
|
+
withUserContext() {
|
|
19
31
|
return this;
|
|
20
32
|
}
|
|
21
33
|
async query({ signal }) {
|
|
22
34
|
await cancellableTimeout(100, signal);
|
|
23
35
|
return Promise.resolve({
|
|
24
|
-
|
|
25
|
-
|
|
36
|
+
routing: {
|
|
37
|
+
useCase: "GENERAL",
|
|
38
|
+
reasoning: "",
|
|
39
|
+
},
|
|
40
|
+
textResponse: "",
|
|
41
|
+
foundObjects: {
|
|
42
|
+
objects: [],
|
|
43
|
+
reasoning: "",
|
|
44
|
+
},
|
|
45
|
+
createdVisualizations: {
|
|
46
|
+
objects: [],
|
|
47
|
+
reasoning: "",
|
|
48
|
+
},
|
|
26
49
|
});
|
|
27
50
|
}
|
|
28
51
|
}
|
|
@@ -31,8 +54,11 @@ const cancellableTimeout = async (ms, signal) => {
|
|
|
31
54
|
if (signal?.aborted) {
|
|
32
55
|
rej(signal.reason);
|
|
33
56
|
}
|
|
34
|
-
|
|
35
|
-
|
|
57
|
+
const tm = setTimeout(res, ms);
|
|
58
|
+
signal?.addEventListener("abort", () => {
|
|
59
|
+
clearTimeout(tm);
|
|
60
|
+
rej(signal.reason);
|
|
61
|
+
});
|
|
36
62
|
});
|
|
37
63
|
};
|
|
38
64
|
//# sourceMappingURL=DummyGenAIChatThread.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DummyGenAIChatThread.js","sourceRoot":"","sources":["../../src/dummyBackend/DummyGenAIChatThread.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DummyGenAIChatThread.js","sourceRoot":"","sources":["../../src/dummyBackend/DummyGenAIChatThread.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC7B,KAAK,CAAC,WAAW,CACb,kBAA0B,EAC1B,EAAE,MAAM,EAA4B;QAEpC,MAAM,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC;YACnB,YAAY,EAAE,EAAE;SACnB,CAAC,CAAC;IACP,CAAC;IACD,KAAK,CAAC,KAAK;QACP,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;IACD,KAAK,CAAC,YAAoB;QACtB,OAAO,IAAI,0BAA0B,EAAE,CAAC;IAC5C,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,OAAO,0BAA0B;IACnC,eAAe;QACX,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,eAAe;QACX,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,eAAe;QACX,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,EAAE,MAAM,EAA4B;QAC5C,MAAM,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO,OAAO,CAAC,OAAO,CAAC;YACnB,OAAO,EAAE;gBACL,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,EAAE;aAChB;YACD,YAAY,EAAE,EAAE;YAChB,YAAY,EAAE;gBACV,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,EAAE;aAChB;YACD,qBAAqB,EAAE;gBACnB,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,EAAE;aAChB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAED,MAAM,kBAAkB,GAAG,KAAK,EAAE,EAAU,EAAE,MAAoB,EAAE,EAAE;IAClE,OAAO,IAAI,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC5B,IAAI,MAAM,EAAE,OAAO,EAAE,CAAC;YAClB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QACD,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/B,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YACnC,YAAY,CAAC,EAAE,CAAC,CAAC;YACjB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC"}
|
|
@@ -39,6 +39,8 @@ import { ICatalogFact } from '@gooddata/sdk-model';
|
|
|
39
39
|
import { ICatalogGroup } from '@gooddata/sdk-model';
|
|
40
40
|
import { ICatalogMeasure } from '@gooddata/sdk-model';
|
|
41
41
|
import { IChatThread } from '@gooddata/sdk-backend-spi';
|
|
42
|
+
import { IChatThreadHistory } from '@gooddata/sdk-backend-spi';
|
|
43
|
+
import { IChatThreadQuery } from '@gooddata/sdk-backend-spi';
|
|
42
44
|
import { IClusteringConfig } from '@gooddata/sdk-backend-spi';
|
|
43
45
|
import { IClusteringResult } from '@gooddata/sdk-backend-spi';
|
|
44
46
|
import { IDashboard } from '@gooddata/sdk-model';
|
|
@@ -71,7 +73,6 @@ import { IFilter } from '@gooddata/sdk-model';
|
|
|
71
73
|
import { IFilterContextDefinition } from '@gooddata/sdk-model';
|
|
72
74
|
import { IForecastConfig } from '@gooddata/sdk-backend-spi';
|
|
73
75
|
import { IForecastResult } from '@gooddata/sdk-backend-spi';
|
|
74
|
-
import { IGenAIChatEvaluation } from '@gooddata/sdk-model';
|
|
75
76
|
import { IGetDashboardOptions } from '@gooddata/sdk-backend-spi';
|
|
76
77
|
import { IGetDashboardPluginOptions } from '@gooddata/sdk-backend-spi';
|
|
77
78
|
import { IGetScheduledMailOptions } from '@gooddata/sdk-backend-spi';
|
|
@@ -1158,18 +1159,15 @@ export declare function dummyBackendEmptyData(): IAnalyticalBackend;
|
|
|
1158
1159
|
export declare function dummyDataView(definition: IExecutionDefinition, result?: IExecutionResult, config?: DummyBackendConfig): IDataView;
|
|
1159
1160
|
|
|
1160
1161
|
/**
|
|
1161
|
-
* Dummy
|
|
1162
|
+
* Dummy chat thread interface for testing.
|
|
1162
1163
|
* @internal
|
|
1163
1164
|
*/
|
|
1164
1165
|
export declare class DummyGenAIChatThread implements IChatThread {
|
|
1165
|
-
|
|
1166
|
-
withSearchLimit(): IChatThread;
|
|
1167
|
-
withUserContext(): IChatThread;
|
|
1168
|
-
withCreateLimit(): IChatThread;
|
|
1169
|
-
withQuestion(): IChatThread;
|
|
1170
|
-
query({ signal }: {
|
|
1166
|
+
loadHistory(_fromInteractionId: number, { signal }: {
|
|
1171
1167
|
signal?: AbortSignal;
|
|
1172
|
-
}): Promise<
|
|
1168
|
+
}): Promise<IChatThreadHistory>;
|
|
1169
|
+
reset(): Promise<void>;
|
|
1170
|
+
query(_userMessage: string): IChatThreadQuery;
|
|
1173
1171
|
}
|
|
1174
1172
|
|
|
1175
1173
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-base",
|
|
3
|
-
"version": "10.13.0-alpha.
|
|
3
|
+
"version": "10.13.0-alpha.15",
|
|
4
4
|
"author": "GoodData",
|
|
5
5
|
"description": "GoodData.UI SDK - Base for backend implementations",
|
|
6
6
|
"repository": {
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"tslib": "^2.5.0",
|
|
30
30
|
"uuid": "^8.3.2",
|
|
31
31
|
"lru-cache": "^10.0.1",
|
|
32
|
-
"@gooddata/sdk-backend-spi": "10.13.0-alpha.
|
|
33
|
-
"@gooddata/
|
|
34
|
-
"@gooddata/
|
|
32
|
+
"@gooddata/sdk-backend-spi": "10.13.0-alpha.15",
|
|
33
|
+
"@gooddata/util": "10.13.0-alpha.15",
|
|
34
|
+
"@gooddata/sdk-model": "10.13.0-alpha.15"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@gooddata/eslint-config": "^4.1.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"prettier": "~2.5.0",
|
|
59
59
|
"typescript": "5.3.3",
|
|
60
60
|
"vitest": "1.0.4",
|
|
61
|
-
"@gooddata/reference-workspace": "10.13.0-alpha.
|
|
61
|
+
"@gooddata/reference-workspace": "10.13.0-alpha.15"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"clean": "rm -rf ci dist esm coverage *.log tsconfig.tsbuildinfo",
|