@wildix/wim-knowledge-base-client 0.0.43 → 0.0.45

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.
@@ -382,11 +382,11 @@ const se_QueryKnowledgeBaseCommand = async (input, context) => {
382
382
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
383
383
  const query = (0, smithy_client_1.map)({
384
384
  [_c]: [, input[_cI]],
385
- [_q]: [, (0, smithy_client_1.expectNonNull)(input[_q], `query`)],
386
385
  });
387
386
  let body;
388
387
  body = JSON.stringify((0, smithy_client_1.take)(input, {
389
388
  'llmConfig': _ => se_LlmConfig(_, context),
389
+ 'query': [],
390
390
  'searchConfig': _ => se_SearchConfig(_, context),
391
391
  }));
392
392
  b.m("POST")
@@ -431,10 +431,10 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
431
431
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
432
432
  const query = (0, smithy_client_1.map)({
433
433
  [_c]: [, input[_cI]],
434
- [_q]: [, (0, smithy_client_1.expectNonNull)(input[_q], `query`)],
435
434
  });
436
435
  let body;
437
436
  body = JSON.stringify((0, smithy_client_1.take)(input, {
437
+ 'query': [],
438
438
  'searchConfig': _ => se_SearchConfig(_, context),
439
439
  'withMetadata': [],
440
440
  }));
@@ -1197,12 +1197,14 @@ const de_SearchHistoryResults = (output, context) => {
1197
1197
  };
1198
1198
  const de_SearchKnowledgeBaseResult = (output, context) => {
1199
1199
  return (0, smithy_client_1.take)(output, {
1200
+ 'bm25Score': smithy_client_1.limitedParseDouble,
1200
1201
  'content': smithy_client_1.expectString,
1201
1202
  'dataSourceId': smithy_client_1.expectString,
1202
1203
  'dataSourceType': smithy_client_1.expectString,
1203
1204
  'documentId': smithy_client_1.expectString,
1204
1205
  'documentTitle': smithy_client_1.expectString,
1205
1206
  'documentUrl': smithy_client_1.expectString,
1207
+ 'knnScore': smithy_client_1.limitedParseDouble,
1206
1208
  'score': smithy_client_1.limitedParseDouble,
1207
1209
  });
1208
1210
  };
@@ -1225,7 +1227,6 @@ const _dT = "documentType";
1225
1227
  const _eSI = "externalSessionId";
1226
1228
  const _l = "limit";
1227
1229
  const _o = "offset";
1228
- const _q = "query";
1229
1230
  const _s = "sort";
1230
1231
  const _sT = "syncType";
1231
1232
  const _sU = "searchUser";
@@ -358,11 +358,11 @@ export const se_QueryKnowledgeBaseCommand = async (input, context) => {
358
358
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
359
359
  const query = map({
360
360
  [_c]: [, input[_cI]],
361
- [_q]: [, __expectNonNull(input[_q], `query`)],
362
361
  });
363
362
  let body;
364
363
  body = JSON.stringify(take(input, {
365
364
  'llmConfig': _ => se_LlmConfig(_, context),
365
+ 'query': [],
366
366
  'searchConfig': _ => se_SearchConfig(_, context),
367
367
  }));
368
368
  b.m("POST")
@@ -405,10 +405,10 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
405
405
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
406
406
  const query = map({
407
407
  [_c]: [, input[_cI]],
408
- [_q]: [, __expectNonNull(input[_q], `query`)],
409
408
  });
410
409
  let body;
411
410
  body = JSON.stringify(take(input, {
411
+ 'query': [],
412
412
  'searchConfig': _ => se_SearchConfig(_, context),
413
413
  'withMetadata': [],
414
414
  }));
@@ -1137,12 +1137,14 @@ const de_SearchHistoryResults = (output, context) => {
1137
1137
  };
1138
1138
  const de_SearchKnowledgeBaseResult = (output, context) => {
1139
1139
  return take(output, {
1140
+ 'bm25Score': __limitedParseDouble,
1140
1141
  'content': __expectString,
1141
1142
  'dataSourceId': __expectString,
1142
1143
  'dataSourceType': __expectString,
1143
1144
  'documentId': __expectString,
1144
1145
  'documentTitle': __expectString,
1145
1146
  'documentUrl': __expectString,
1147
+ 'knnScore': __limitedParseDouble,
1146
1148
  'score': __limitedParseDouble,
1147
1149
  });
1148
1150
  };
@@ -1165,7 +1167,6 @@ const _dT = "documentType";
1165
1167
  const _eSI = "externalSessionId";
1166
1168
  const _l = "limit";
1167
1169
  const _o = "offset";
1168
- const _q = "query";
1169
1170
  const _s = "sort";
1170
1171
  const _sT = "syncType";
1171
1172
  const _sU = "searchUser";
@@ -61,6 +61,8 @@ declare const SearchKnowledgeBaseCommand_base: {
61
61
  * // dataSourceType: "files" || "confluence" || "gdrive" || "proxy", // required
62
62
  * // content: "STRING_VALUE", // required
63
63
  * // score: Number("double"), // required
64
+ * // knnScore: Number("double"),
65
+ * // bm25Score: Number("double"),
64
66
  * // },
65
67
  * // ],
66
68
  * // metadata: "DOCUMENT_VALUE",
@@ -1630,7 +1630,21 @@ export interface SearchKnowledgeBaseResult {
1630
1630
  dataSourceId: string;
1631
1631
  dataSourceType: DataSourceType;
1632
1632
  content: string;
1633
+ /**
1634
+ * The total score of the result, calculated from the semantic search score and the full-text search score.
1635
+ * @public
1636
+ */
1633
1637
  score: number;
1638
+ /**
1639
+ * The score of semantic search.
1640
+ * @public
1641
+ */
1642
+ knnScore?: number | undefined;
1643
+ /**
1644
+ * The score of the result from the full-text search.
1645
+ * @public
1646
+ */
1647
+ bm25Score?: number | undefined;
1634
1648
  }
1635
1649
  /**
1636
1650
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wim-knowledge-base-client",
3
3
  "description": "@wildix/wim-knowledge-base-client client",
4
- "version": "0.0.43",
4
+ "version": "0.0.45",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",