@alicloud/gpdb20160503 2.9.1 → 2.11.0
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/dist/client.d.ts +68 -0
- package/dist/client.js +320 -0
- package/dist/client.js.map +1 -1
- package/dist/models/ChatWithKnowledgeBaseRequest.d.ts +330 -0
- package/dist/models/ChatWithKnowledgeBaseRequest.js +382 -0
- package/dist/models/ChatWithKnowledgeBaseRequest.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseResponse.d.ts +19 -0
- package/dist/models/ChatWithKnowledgeBaseResponse.js +69 -0
- package/dist/models/ChatWithKnowledgeBaseResponse.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseResponseBody.d.ts +314 -0
- package/dist/models/ChatWithKnowledgeBaseResponseBody.js +377 -0
- package/dist/models/ChatWithKnowledgeBaseResponseBody.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseShrinkRequest.d.ts +39 -0
- package/dist/models/ChatWithKnowledgeBaseShrinkRequest.js +70 -0
- package/dist/models/ChatWithKnowledgeBaseShrinkRequest.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseStreamRequest.d.ts +330 -0
- package/dist/models/ChatWithKnowledgeBaseStreamRequest.js +382 -0
- package/dist/models/ChatWithKnowledgeBaseStreamRequest.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponse.d.ts +19 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponse.js +69 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponse.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponseBody.d.ts +314 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponseBody.js +377 -0
- package/dist/models/ChatWithKnowledgeBaseStreamResponseBody.js.map +1 -0
- package/dist/models/ChatWithKnowledgeBaseStreamShrinkRequest.d.ts +39 -0
- package/dist/models/ChatWithKnowledgeBaseStreamShrinkRequest.js +70 -0
- package/dist/models/ChatWithKnowledgeBaseStreamShrinkRequest.js.map +1 -0
- package/dist/models/QueryContentAdvanceRequest.d.ts +10 -0
- package/dist/models/QueryContentAdvanceRequest.js +4 -0
- package/dist/models/QueryContentAdvanceRequest.js.map +1 -1
- package/dist/models/QueryContentRequest.d.ts +10 -0
- package/dist/models/QueryContentRequest.js +4 -0
- package/dist/models/QueryContentRequest.js.map +1 -1
- package/dist/models/QueryContentShrinkRequest.d.ts +10 -0
- package/dist/models/QueryContentShrinkRequest.js +4 -0
- package/dist/models/QueryContentShrinkRequest.js.map +1 -1
- package/dist/models/QueryKnowledgeBasesContentRequest.d.ts +213 -0
- package/dist/models/QueryKnowledgeBasesContentRequest.js +245 -0
- package/dist/models/QueryKnowledgeBasesContentRequest.js.map +1 -0
- package/dist/models/QueryKnowledgeBasesContentResponse.d.ts +19 -0
- package/dist/models/QueryKnowledgeBasesContentResponse.js +69 -0
- package/dist/models/QueryKnowledgeBasesContentResponse.js.map +1 -0
- package/dist/models/QueryKnowledgeBasesContentResponseBody.d.ts +215 -0
- package/dist/models/QueryKnowledgeBasesContentResponseBody.js +263 -0
- package/dist/models/QueryKnowledgeBasesContentResponseBody.js.map +1 -0
- package/dist/models/QueryKnowledgeBasesContentShrinkRequest.d.ts +56 -0
- package/dist/models/QueryKnowledgeBasesContentShrinkRequest.js +74 -0
- package/dist/models/QueryKnowledgeBasesContentShrinkRequest.js.map +1 -0
- package/dist/models/model.d.ts +69 -0
- package/dist/models/model.js +157 -18
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +337 -0
- package/src/models/ChatWithKnowledgeBaseRequest.ts +566 -0
- package/src/models/ChatWithKnowledgeBaseResponse.ts +40 -0
- package/src/models/ChatWithKnowledgeBaseResponseBody.ts +547 -0
- package/src/models/ChatWithKnowledgeBaseShrinkRequest.ts +64 -0
- package/src/models/ChatWithKnowledgeBaseStreamRequest.ts +566 -0
- package/src/models/ChatWithKnowledgeBaseStreamResponse.ts +40 -0
- package/src/models/ChatWithKnowledgeBaseStreamResponseBody.ts +547 -0
- package/src/models/ChatWithKnowledgeBaseStreamShrinkRequest.ts +64 -0
- package/src/models/QueryContentAdvanceRequest.ts +14 -0
- package/src/models/QueryContentRequest.ts +14 -0
- package/src/models/QueryContentShrinkRequest.ts +14 -0
- package/src/models/QueryKnowledgeBasesContentRequest.ts +357 -0
- package/src/models/QueryKnowledgeBasesContentResponse.ts +40 -0
- package/src/models/QueryKnowledgeBasesContentResponseBody.ts +368 -0
- package/src/models/QueryKnowledgeBasesContentShrinkRequest.ts +85 -0
- package/src/models/model.ts +69 -0
package/dist/client.d.ts
CHANGED
|
@@ -129,6 +129,59 @@ export default class Client extends OpenApi {
|
|
|
129
129
|
* @returns CancelUpsertCollectionDataJobResponse
|
|
130
130
|
*/
|
|
131
131
|
cancelUpsertCollectionDataJob(request: $_model.CancelUpsertCollectionDataJobRequest): Promise<$_model.CancelUpsertCollectionDataJobResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
134
|
+
*
|
|
135
|
+
* @remarks
|
|
136
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
137
|
+
*
|
|
138
|
+
* @param tmpReq - ChatWithKnowledgeBaseRequest
|
|
139
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
140
|
+
* @returns ChatWithKnowledgeBaseResponse
|
|
141
|
+
*/
|
|
142
|
+
chatWithKnowledgeBaseWithOptions(tmpReq: $_model.ChatWithKnowledgeBaseRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ChatWithKnowledgeBaseResponse>;
|
|
143
|
+
/**
|
|
144
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
145
|
+
*
|
|
146
|
+
* @remarks
|
|
147
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
148
|
+
*
|
|
149
|
+
* @param request - ChatWithKnowledgeBaseRequest
|
|
150
|
+
* @returns ChatWithKnowledgeBaseResponse
|
|
151
|
+
*/
|
|
152
|
+
chatWithKnowledgeBase(request: $_model.ChatWithKnowledgeBaseRequest): Promise<$_model.ChatWithKnowledgeBaseResponse>;
|
|
153
|
+
/**
|
|
154
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
155
|
+
*
|
|
156
|
+
* @remarks
|
|
157
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
158
|
+
*
|
|
159
|
+
* @param tmpReq - ChatWithKnowledgeBaseStreamRequest
|
|
160
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
161
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
162
|
+
*/
|
|
163
|
+
chatWithKnowledgeBaseStreamWithSSE(tmpReq: $_model.ChatWithKnowledgeBaseStreamRequest, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.ChatWithKnowledgeBaseStreamResponse, any, unknown>;
|
|
164
|
+
/**
|
|
165
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
166
|
+
*
|
|
167
|
+
* @remarks
|
|
168
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
169
|
+
*
|
|
170
|
+
* @param tmpReq - ChatWithKnowledgeBaseStreamRequest
|
|
171
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
172
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
173
|
+
*/
|
|
174
|
+
chatWithKnowledgeBaseStreamWithOptions(tmpReq: $_model.ChatWithKnowledgeBaseStreamRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ChatWithKnowledgeBaseStreamResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
177
|
+
*
|
|
178
|
+
* @remarks
|
|
179
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
180
|
+
*
|
|
181
|
+
* @param request - ChatWithKnowledgeBaseStreamRequest
|
|
182
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
183
|
+
*/
|
|
184
|
+
chatWithKnowledgeBaseStream(request: $_model.ChatWithKnowledgeBaseStreamRequest): Promise<$_model.ChatWithKnowledgeBaseStreamResponse>;
|
|
132
185
|
/**
|
|
133
186
|
* Checks the configurations of a Hadoop data source.
|
|
134
187
|
*
|
|
@@ -3448,6 +3501,21 @@ export default class Client extends OpenApi {
|
|
|
3448
3501
|
*/
|
|
3449
3502
|
queryContent(request: $_model.QueryContentRequest): Promise<$_model.QueryContentResponse>;
|
|
3450
3503
|
queryContentAdvance(request: $_model.QueryContentAdvanceRequest, runtime: $dara.RuntimeOptions): Promise<$_model.QueryContentResponse>;
|
|
3504
|
+
/**
|
|
3505
|
+
* 多知识库查询
|
|
3506
|
+
*
|
|
3507
|
+
* @param tmpReq - QueryKnowledgeBasesContentRequest
|
|
3508
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3509
|
+
* @returns QueryKnowledgeBasesContentResponse
|
|
3510
|
+
*/
|
|
3511
|
+
queryKnowledgeBasesContentWithOptions(tmpReq: $_model.QueryKnowledgeBasesContentRequest, runtime: $dara.RuntimeOptions): Promise<$_model.QueryKnowledgeBasesContentResponse>;
|
|
3512
|
+
/**
|
|
3513
|
+
* 多知识库查询
|
|
3514
|
+
*
|
|
3515
|
+
* @param request - QueryKnowledgeBasesContentRequest
|
|
3516
|
+
* @returns QueryKnowledgeBasesContentResponse
|
|
3517
|
+
*/
|
|
3518
|
+
queryKnowledgeBasesContent(request: $_model.QueryKnowledgeBasesContentRequest): Promise<$_model.QueryKnowledgeBasesContentResponse>;
|
|
3451
3519
|
/**
|
|
3452
3520
|
* Rebalances an AnalyticDB for PostgreSQL instance.
|
|
3453
3521
|
*
|
package/dist/client.js
CHANGED
|
@@ -35,6 +35,26 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
39
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
40
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
41
|
+
var m = o[Symbol.asyncIterator], i;
|
|
42
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
43
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
44
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
45
|
+
};
|
|
46
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
47
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
48
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
49
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
50
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
51
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
52
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
53
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
54
|
+
function fulfill(value) { resume("next", value); }
|
|
55
|
+
function reject(value) { resume("throw", value); }
|
|
56
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
57
|
+
};
|
|
38
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
59
|
// This file is auto-generated, don't edit it
|
|
40
60
|
const $dara = __importStar(require("@darabonba/typescript"));
|
|
@@ -467,6 +487,229 @@ class Client extends openapi_core_1.default {
|
|
|
467
487
|
let runtime = new $dara.RuntimeOptions({});
|
|
468
488
|
return await this.cancelUpsertCollectionDataJobWithOptions(request, runtime);
|
|
469
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
492
|
+
*
|
|
493
|
+
* @remarks
|
|
494
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
495
|
+
*
|
|
496
|
+
* @param tmpReq - ChatWithKnowledgeBaseRequest
|
|
497
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
498
|
+
* @returns ChatWithKnowledgeBaseResponse
|
|
499
|
+
*/
|
|
500
|
+
async chatWithKnowledgeBaseWithOptions(tmpReq, runtime) {
|
|
501
|
+
tmpReq.validate();
|
|
502
|
+
let request = new $_model.ChatWithKnowledgeBaseShrinkRequest({});
|
|
503
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
504
|
+
if (!$dara.isNull(tmpReq.knowledgeParams)) {
|
|
505
|
+
request.knowledgeParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.knowledgeParams, "KnowledgeParams", "json");
|
|
506
|
+
}
|
|
507
|
+
if (!$dara.isNull(tmpReq.modelParams)) {
|
|
508
|
+
request.modelParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.modelParams, "ModelParams", "json");
|
|
509
|
+
}
|
|
510
|
+
let query = {};
|
|
511
|
+
if (!$dara.isNull(request.DBInstanceId)) {
|
|
512
|
+
query["DBInstanceId"] = request.DBInstanceId;
|
|
513
|
+
}
|
|
514
|
+
if (!$dara.isNull(request.includeKnowledgeBaseResults)) {
|
|
515
|
+
query["IncludeKnowledgeBaseResults"] = request.includeKnowledgeBaseResults;
|
|
516
|
+
}
|
|
517
|
+
if (!$dara.isNull(request.knowledgeParamsShrink)) {
|
|
518
|
+
query["KnowledgeParams"] = request.knowledgeParamsShrink;
|
|
519
|
+
}
|
|
520
|
+
if (!$dara.isNull(request.modelParamsShrink)) {
|
|
521
|
+
query["ModelParams"] = request.modelParamsShrink;
|
|
522
|
+
}
|
|
523
|
+
if (!$dara.isNull(request.ownerId)) {
|
|
524
|
+
query["OwnerId"] = request.ownerId;
|
|
525
|
+
}
|
|
526
|
+
if (!$dara.isNull(request.promptParams)) {
|
|
527
|
+
query["PromptParams"] = request.promptParams;
|
|
528
|
+
}
|
|
529
|
+
if (!$dara.isNull(request.regionId)) {
|
|
530
|
+
query["RegionId"] = request.regionId;
|
|
531
|
+
}
|
|
532
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
533
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
534
|
+
});
|
|
535
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
536
|
+
action: "ChatWithKnowledgeBase",
|
|
537
|
+
version: "2016-05-03",
|
|
538
|
+
protocol: "HTTPS",
|
|
539
|
+
pathname: "/",
|
|
540
|
+
method: "POST",
|
|
541
|
+
authType: "AK",
|
|
542
|
+
style: "RPC",
|
|
543
|
+
reqBodyType: "formData",
|
|
544
|
+
bodyType: "json",
|
|
545
|
+
});
|
|
546
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ChatWithKnowledgeBaseResponse({}));
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
550
|
+
*
|
|
551
|
+
* @remarks
|
|
552
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
553
|
+
*
|
|
554
|
+
* @param request - ChatWithKnowledgeBaseRequest
|
|
555
|
+
* @returns ChatWithKnowledgeBaseResponse
|
|
556
|
+
*/
|
|
557
|
+
async chatWithKnowledgeBase(request) {
|
|
558
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
559
|
+
return await this.chatWithKnowledgeBaseWithOptions(request, runtime);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
563
|
+
*
|
|
564
|
+
* @remarks
|
|
565
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
566
|
+
*
|
|
567
|
+
* @param tmpReq - ChatWithKnowledgeBaseStreamRequest
|
|
568
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
569
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
570
|
+
*/
|
|
571
|
+
chatWithKnowledgeBaseStreamWithSSE(tmpReq, runtime) {
|
|
572
|
+
return __asyncGenerator(this, arguments, function* chatWithKnowledgeBaseStreamWithSSE_1() {
|
|
573
|
+
var _a, e_1, _b, _c;
|
|
574
|
+
tmpReq.validate();
|
|
575
|
+
let request = new $_model.ChatWithKnowledgeBaseStreamShrinkRequest({});
|
|
576
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
577
|
+
if (!$dara.isNull(tmpReq.knowledgeParams)) {
|
|
578
|
+
request.knowledgeParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.knowledgeParams, "KnowledgeParams", "json");
|
|
579
|
+
}
|
|
580
|
+
if (!$dara.isNull(tmpReq.modelParams)) {
|
|
581
|
+
request.modelParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.modelParams, "ModelParams", "json");
|
|
582
|
+
}
|
|
583
|
+
let query = {};
|
|
584
|
+
if (!$dara.isNull(request.DBInstanceId)) {
|
|
585
|
+
query["DBInstanceId"] = request.DBInstanceId;
|
|
586
|
+
}
|
|
587
|
+
if (!$dara.isNull(request.includeKnowledgeBaseResults)) {
|
|
588
|
+
query["IncludeKnowledgeBaseResults"] = request.includeKnowledgeBaseResults;
|
|
589
|
+
}
|
|
590
|
+
if (!$dara.isNull(request.knowledgeParamsShrink)) {
|
|
591
|
+
query["KnowledgeParams"] = request.knowledgeParamsShrink;
|
|
592
|
+
}
|
|
593
|
+
if (!$dara.isNull(request.modelParamsShrink)) {
|
|
594
|
+
query["ModelParams"] = request.modelParamsShrink;
|
|
595
|
+
}
|
|
596
|
+
if (!$dara.isNull(request.ownerId)) {
|
|
597
|
+
query["OwnerId"] = request.ownerId;
|
|
598
|
+
}
|
|
599
|
+
if (!$dara.isNull(request.promptParams)) {
|
|
600
|
+
query["PromptParams"] = request.promptParams;
|
|
601
|
+
}
|
|
602
|
+
if (!$dara.isNull(request.regionId)) {
|
|
603
|
+
query["RegionId"] = request.regionId;
|
|
604
|
+
}
|
|
605
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
606
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
607
|
+
});
|
|
608
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
609
|
+
action: "ChatWithKnowledgeBaseStream",
|
|
610
|
+
version: "2016-05-03",
|
|
611
|
+
protocol: "HTTPS",
|
|
612
|
+
pathname: "/",
|
|
613
|
+
method: "POST",
|
|
614
|
+
authType: "AK",
|
|
615
|
+
style: "RPC",
|
|
616
|
+
reqBodyType: "formData",
|
|
617
|
+
bodyType: "json",
|
|
618
|
+
});
|
|
619
|
+
let sseResp = yield __await(this.callSSEApi(params, req, runtime));
|
|
620
|
+
try {
|
|
621
|
+
for (var _d = true, sseResp_1 = __asyncValues(sseResp), sseResp_1_1; sseResp_1_1 = yield __await(sseResp_1.next()), _a = sseResp_1_1.done, !_a; _d = true) {
|
|
622
|
+
_c = sseResp_1_1.value;
|
|
623
|
+
_d = false;
|
|
624
|
+
let resp = _c;
|
|
625
|
+
let data = JSON.parse(resp.event.data);
|
|
626
|
+
yield yield __await($dara.cast({
|
|
627
|
+
statusCode: resp.statusCode,
|
|
628
|
+
headers: resp.headers,
|
|
629
|
+
body: Object.assign(Object.assign({}, data), { RequestId: resp.event.id, Message: resp.event.event }),
|
|
630
|
+
}, new $_model.ChatWithKnowledgeBaseStreamResponse({})));
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
634
|
+
finally {
|
|
635
|
+
try {
|
|
636
|
+
if (!_d && !_a && (_b = sseResp_1.return)) yield __await(_b.call(sseResp_1));
|
|
637
|
+
}
|
|
638
|
+
finally { if (e_1) throw e_1.error; }
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
644
|
+
*
|
|
645
|
+
* @remarks
|
|
646
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
647
|
+
*
|
|
648
|
+
* @param tmpReq - ChatWithKnowledgeBaseStreamRequest
|
|
649
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
650
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
651
|
+
*/
|
|
652
|
+
async chatWithKnowledgeBaseStreamWithOptions(tmpReq, runtime) {
|
|
653
|
+
tmpReq.validate();
|
|
654
|
+
let request = new $_model.ChatWithKnowledgeBaseStreamShrinkRequest({});
|
|
655
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
656
|
+
if (!$dara.isNull(tmpReq.knowledgeParams)) {
|
|
657
|
+
request.knowledgeParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.knowledgeParams, "KnowledgeParams", "json");
|
|
658
|
+
}
|
|
659
|
+
if (!$dara.isNull(tmpReq.modelParams)) {
|
|
660
|
+
request.modelParamsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.modelParams, "ModelParams", "json");
|
|
661
|
+
}
|
|
662
|
+
let query = {};
|
|
663
|
+
if (!$dara.isNull(request.DBInstanceId)) {
|
|
664
|
+
query["DBInstanceId"] = request.DBInstanceId;
|
|
665
|
+
}
|
|
666
|
+
if (!$dara.isNull(request.includeKnowledgeBaseResults)) {
|
|
667
|
+
query["IncludeKnowledgeBaseResults"] = request.includeKnowledgeBaseResults;
|
|
668
|
+
}
|
|
669
|
+
if (!$dara.isNull(request.knowledgeParamsShrink)) {
|
|
670
|
+
query["KnowledgeParams"] = request.knowledgeParamsShrink;
|
|
671
|
+
}
|
|
672
|
+
if (!$dara.isNull(request.modelParamsShrink)) {
|
|
673
|
+
query["ModelParams"] = request.modelParamsShrink;
|
|
674
|
+
}
|
|
675
|
+
if (!$dara.isNull(request.ownerId)) {
|
|
676
|
+
query["OwnerId"] = request.ownerId;
|
|
677
|
+
}
|
|
678
|
+
if (!$dara.isNull(request.promptParams)) {
|
|
679
|
+
query["PromptParams"] = request.promptParams;
|
|
680
|
+
}
|
|
681
|
+
if (!$dara.isNull(request.regionId)) {
|
|
682
|
+
query["RegionId"] = request.regionId;
|
|
683
|
+
}
|
|
684
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
685
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
686
|
+
});
|
|
687
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
688
|
+
action: "ChatWithKnowledgeBaseStream",
|
|
689
|
+
version: "2016-05-03",
|
|
690
|
+
protocol: "HTTPS",
|
|
691
|
+
pathname: "/",
|
|
692
|
+
method: "POST",
|
|
693
|
+
authType: "AK",
|
|
694
|
+
style: "RPC",
|
|
695
|
+
reqBodyType: "formData",
|
|
696
|
+
bodyType: "json",
|
|
697
|
+
});
|
|
698
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ChatWithKnowledgeBaseStreamResponse({}));
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
702
|
+
*
|
|
703
|
+
* @remarks
|
|
704
|
+
* 通过结合知识库和大模型,提供智能问答服务。
|
|
705
|
+
*
|
|
706
|
+
* @param request - ChatWithKnowledgeBaseStreamRequest
|
|
707
|
+
* @returns ChatWithKnowledgeBaseStreamResponse
|
|
708
|
+
*/
|
|
709
|
+
async chatWithKnowledgeBaseStream(request) {
|
|
710
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
711
|
+
return await this.chatWithKnowledgeBaseStreamWithOptions(request, runtime);
|
|
712
|
+
}
|
|
470
713
|
/**
|
|
471
714
|
* Checks the configurations of a Hadoop data source.
|
|
472
715
|
*
|
|
@@ -11144,6 +11387,12 @@ class Client extends openapi_core_1.default {
|
|
|
11144
11387
|
if (!$dara.isNull(request.namespacePassword)) {
|
|
11145
11388
|
query["NamespacePassword"] = request.namespacePassword;
|
|
11146
11389
|
}
|
|
11390
|
+
if (!$dara.isNull(request.offset)) {
|
|
11391
|
+
query["Offset"] = request.offset;
|
|
11392
|
+
}
|
|
11393
|
+
if (!$dara.isNull(request.orderBy)) {
|
|
11394
|
+
query["OrderBy"] = request.orderBy;
|
|
11395
|
+
}
|
|
11147
11396
|
if (!$dara.isNull(request.ownerId)) {
|
|
11148
11397
|
query["OwnerId"] = request.ownerId;
|
|
11149
11398
|
}
|
|
@@ -11277,6 +11526,77 @@ class Client extends openapi_core_1.default {
|
|
|
11277
11526
|
let queryContentResp = await this.queryContentWithOptions(queryContentReq, runtime);
|
|
11278
11527
|
return queryContentResp;
|
|
11279
11528
|
}
|
|
11529
|
+
/**
|
|
11530
|
+
* 多知识库查询
|
|
11531
|
+
*
|
|
11532
|
+
* @param tmpReq - QueryKnowledgeBasesContentRequest
|
|
11533
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
11534
|
+
* @returns QueryKnowledgeBasesContentResponse
|
|
11535
|
+
*/
|
|
11536
|
+
async queryKnowledgeBasesContentWithOptions(tmpReq, runtime) {
|
|
11537
|
+
tmpReq.validate();
|
|
11538
|
+
let request = new $_model.QueryKnowledgeBasesContentShrinkRequest({});
|
|
11539
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
11540
|
+
if (!$dara.isNull(tmpReq.mergeMethodArgs)) {
|
|
11541
|
+
request.mergeMethodArgsShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.mergeMethodArgs, "MergeMethodArgs", "json");
|
|
11542
|
+
}
|
|
11543
|
+
if (!$dara.isNull(tmpReq.sourceCollection)) {
|
|
11544
|
+
request.sourceCollectionShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sourceCollection, "SourceCollection", "json");
|
|
11545
|
+
}
|
|
11546
|
+
let query = {};
|
|
11547
|
+
if (!$dara.isNull(request.content)) {
|
|
11548
|
+
query["Content"] = request.content;
|
|
11549
|
+
}
|
|
11550
|
+
if (!$dara.isNull(request.DBInstanceId)) {
|
|
11551
|
+
query["DBInstanceId"] = request.DBInstanceId;
|
|
11552
|
+
}
|
|
11553
|
+
if (!$dara.isNull(request.mergeMethod)) {
|
|
11554
|
+
query["MergeMethod"] = request.mergeMethod;
|
|
11555
|
+
}
|
|
11556
|
+
if (!$dara.isNull(request.mergeMethodArgsShrink)) {
|
|
11557
|
+
query["MergeMethodArgs"] = request.mergeMethodArgsShrink;
|
|
11558
|
+
}
|
|
11559
|
+
if (!$dara.isNull(request.ownerId)) {
|
|
11560
|
+
query["OwnerId"] = request.ownerId;
|
|
11561
|
+
}
|
|
11562
|
+
if (!$dara.isNull(request.regionId)) {
|
|
11563
|
+
query["RegionId"] = request.regionId;
|
|
11564
|
+
}
|
|
11565
|
+
if (!$dara.isNull(request.rerankFactor)) {
|
|
11566
|
+
query["RerankFactor"] = request.rerankFactor;
|
|
11567
|
+
}
|
|
11568
|
+
if (!$dara.isNull(request.sourceCollectionShrink)) {
|
|
11569
|
+
query["SourceCollection"] = request.sourceCollectionShrink;
|
|
11570
|
+
}
|
|
11571
|
+
if (!$dara.isNull(request.topK)) {
|
|
11572
|
+
query["TopK"] = request.topK;
|
|
11573
|
+
}
|
|
11574
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
11575
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
11576
|
+
});
|
|
11577
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
11578
|
+
action: "QueryKnowledgeBasesContent",
|
|
11579
|
+
version: "2016-05-03",
|
|
11580
|
+
protocol: "HTTPS",
|
|
11581
|
+
pathname: "/",
|
|
11582
|
+
method: "POST",
|
|
11583
|
+
authType: "AK",
|
|
11584
|
+
style: "RPC",
|
|
11585
|
+
reqBodyType: "formData",
|
|
11586
|
+
bodyType: "json",
|
|
11587
|
+
});
|
|
11588
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.QueryKnowledgeBasesContentResponse({}));
|
|
11589
|
+
}
|
|
11590
|
+
/**
|
|
11591
|
+
* 多知识库查询
|
|
11592
|
+
*
|
|
11593
|
+
* @param request - QueryKnowledgeBasesContentRequest
|
|
11594
|
+
* @returns QueryKnowledgeBasesContentResponse
|
|
11595
|
+
*/
|
|
11596
|
+
async queryKnowledgeBasesContent(request) {
|
|
11597
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
11598
|
+
return await this.queryKnowledgeBasesContentWithOptions(request, runtime);
|
|
11599
|
+
}
|
|
11280
11600
|
/**
|
|
11281
11601
|
* Rebalances an AnalyticDB for PostgreSQL instance.
|
|
11282
11602
|
*
|