@wildix/wim-knowledge-base-client 0.0.65 → 0.1.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-cjs/protocols/Aws_restJson1.js +4 -2
- package/dist-es/protocols/Aws_restJson1.js +4 -2
- package/dist-types/commands/GenerateSearchAnswerCommand.d.ts +2 -0
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +3 -2
- package/dist-types/models/models_0.d.ts +10 -5
- package/dist-types/runtimeConfig.browser.d.ts +6 -1
- package/dist-types/runtimeConfig.d.ts +6 -1
- package/dist-types/runtimeConfig.native.d.ts +6 -1
- package/package.json +1 -1
|
@@ -521,12 +521,12 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
521
521
|
});
|
|
522
522
|
let body;
|
|
523
523
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
524
|
-
'externalSessionId': [],
|
|
525
524
|
'query': [],
|
|
526
525
|
'searchLimit': [],
|
|
527
526
|
'searchStrategy': [],
|
|
528
527
|
'searchThreshold': [],
|
|
529
|
-
'
|
|
528
|
+
'sessionUri': [],
|
|
529
|
+
'sessionUser': [],
|
|
530
530
|
'useQueryOptimization': [],
|
|
531
531
|
}));
|
|
532
532
|
b.m("POST")
|
|
@@ -1265,6 +1265,7 @@ const se_SearchKnowledgeBaseResultItem = (input, context) => {
|
|
|
1265
1265
|
'documentTitle': [],
|
|
1266
1266
|
'documentUrl': [],
|
|
1267
1267
|
'fullTextScore': smithy_client_1.serializeFloat,
|
|
1268
|
+
'metadata': _ => se_Document(_, context),
|
|
1268
1269
|
'score': smithy_client_1.serializeFloat,
|
|
1269
1270
|
'semanticScore': smithy_client_1.serializeFloat,
|
|
1270
1271
|
});
|
|
@@ -1383,6 +1384,7 @@ const de_SearchKnowledgeBaseResultItem = (output, context) => {
|
|
|
1383
1384
|
'documentTitle': smithy_client_1.expectString,
|
|
1384
1385
|
'documentUrl': smithy_client_1.expectString,
|
|
1385
1386
|
'fullTextScore': smithy_client_1.limitedParseDouble,
|
|
1387
|
+
'metadata': (_) => de_Document(_, context),
|
|
1386
1388
|
'score': smithy_client_1.limitedParseDouble,
|
|
1387
1389
|
'semanticScore': smithy_client_1.limitedParseDouble,
|
|
1388
1390
|
});
|
|
@@ -490,12 +490,12 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
490
490
|
});
|
|
491
491
|
let body;
|
|
492
492
|
body = JSON.stringify(take(input, {
|
|
493
|
-
'externalSessionId': [],
|
|
494
493
|
'query': [],
|
|
495
494
|
'searchLimit': [],
|
|
496
495
|
'searchStrategy': [],
|
|
497
496
|
'searchThreshold': [],
|
|
498
|
-
'
|
|
497
|
+
'sessionUri': [],
|
|
498
|
+
'sessionUser': [],
|
|
499
499
|
'useQueryOptimization': [],
|
|
500
500
|
}));
|
|
501
501
|
b.m("POST")
|
|
@@ -1195,6 +1195,7 @@ const se_SearchKnowledgeBaseResultItem = (input, context) => {
|
|
|
1195
1195
|
'documentTitle': [],
|
|
1196
1196
|
'documentUrl': [],
|
|
1197
1197
|
'fullTextScore': __serializeFloat,
|
|
1198
|
+
'metadata': _ => se_Document(_, context),
|
|
1198
1199
|
'score': __serializeFloat,
|
|
1199
1200
|
'semanticScore': __serializeFloat,
|
|
1200
1201
|
});
|
|
@@ -1313,6 +1314,7 @@ const de_SearchKnowledgeBaseResultItem = (output, context) => {
|
|
|
1313
1314
|
'documentTitle': __expectString,
|
|
1314
1315
|
'documentUrl': __expectString,
|
|
1315
1316
|
'fullTextScore': __limitedParseDouble,
|
|
1317
|
+
'metadata': (_) => de_Document(_, context),
|
|
1316
1318
|
'score': __limitedParseDouble,
|
|
1317
1319
|
'semanticScore': __limitedParseDouble,
|
|
1318
1320
|
});
|
|
@@ -52,6 +52,7 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
52
52
|
* "STRING_VALUE",
|
|
53
53
|
* ],
|
|
54
54
|
* content: "STRING_VALUE", // required
|
|
55
|
+
* metadata: "DOCUMENT_VALUE",
|
|
55
56
|
* },
|
|
56
57
|
* ],
|
|
57
58
|
* model: "STRING_VALUE",
|
|
@@ -84,6 +85,7 @@ declare const GenerateSearchAnswerCommand_base: {
|
|
|
84
85
|
* // "STRING_VALUE",
|
|
85
86
|
* // ],
|
|
86
87
|
* // content: "STRING_VALUE", // required
|
|
88
|
+
* // metadata: "DOCUMENT_VALUE",
|
|
87
89
|
* // },
|
|
88
90
|
* // ],
|
|
89
91
|
* // };
|
|
@@ -42,8 +42,8 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
42
42
|
* searchLimit: Number("int"),
|
|
43
43
|
* searchThreshold: "low" || "medium" || "high",
|
|
44
44
|
* useQueryOptimization: true || false,
|
|
45
|
-
*
|
|
46
|
-
*
|
|
45
|
+
* sessionUser: "STRING_VALUE",
|
|
46
|
+
* sessionUri: "STRING_VALUE",
|
|
47
47
|
* };
|
|
48
48
|
* const command = new SearchKnowledgeBaseCommand(input);
|
|
49
49
|
* const response = await client.send(command);
|
|
@@ -63,6 +63,7 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
63
63
|
* // "STRING_VALUE",
|
|
64
64
|
* // ],
|
|
65
65
|
* // content: "STRING_VALUE", // required
|
|
66
|
+
* // metadata: "DOCUMENT_VALUE",
|
|
66
67
|
* // },
|
|
67
68
|
* // ],
|
|
68
69
|
* // metadata: { // SearchResultMetadata
|
|
@@ -1009,6 +1009,11 @@ export interface SearchKnowledgeBaseResultItem {
|
|
|
1009
1009
|
*/
|
|
1010
1010
|
documentHierarchy?: (string)[] | undefined;
|
|
1011
1011
|
content: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* The metadata of the document.
|
|
1014
|
+
* @public
|
|
1015
|
+
*/
|
|
1016
|
+
metadata?: __DocumentType | undefined;
|
|
1012
1017
|
}
|
|
1013
1018
|
/**
|
|
1014
1019
|
* @public
|
|
@@ -1030,7 +1035,7 @@ export interface GenerateSearchAnswerInput {
|
|
|
1030
1035
|
*/
|
|
1031
1036
|
searchResults: (SearchKnowledgeBaseResultItem)[];
|
|
1032
1037
|
/**
|
|
1033
|
-
* The specific provider and model identifier. Examples: 'openai
|
|
1038
|
+
* The specific provider and model identifier. Examples: 'openai://gpt-4o' or 'openai://gpt-4o-mini' for OpenAI, 'mistral://mistral-small-2506' for Mistral. Check provider documentation for available models
|
|
1034
1039
|
* @public
|
|
1035
1040
|
*/
|
|
1036
1041
|
model?: string | undefined;
|
|
@@ -1817,15 +1822,15 @@ export interface SearchKnowledgeBaseInput {
|
|
|
1817
1822
|
*/
|
|
1818
1823
|
useQueryOptimization?: boolean | undefined;
|
|
1819
1824
|
/**
|
|
1820
|
-
* The user who performs the search in the knowledge base. Example: user@example.com
|
|
1825
|
+
* The user who performs the search in the knowledge base. Example: user@example.com or Jon Doe
|
|
1821
1826
|
* @public
|
|
1822
1827
|
*/
|
|
1823
|
-
|
|
1828
|
+
sessionUser?: string | undefined;
|
|
1824
1829
|
/**
|
|
1825
|
-
* The
|
|
1830
|
+
* The session URI. Used for tracking and analytics purposes. Example: chatbots://\{agentId\}/id-of-chat-session/id-of-message
|
|
1826
1831
|
* @public
|
|
1827
1832
|
*/
|
|
1828
|
-
|
|
1833
|
+
sessionUri?: string | undefined;
|
|
1829
1834
|
}
|
|
1830
1835
|
/**
|
|
1831
1836
|
* @public
|
|
@@ -16,8 +16,13 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
16
16
|
env?: "stage" | "stable" | "prod" | undefined;
|
|
17
17
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
18
18
|
endpoint?: (() => Record<string, string>) | undefined;
|
|
19
|
-
apiVersion: string;
|
|
20
19
|
cacheMiddleware?: boolean | undefined;
|
|
20
|
+
protocol?: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any> | undefined;
|
|
21
|
+
protocolSettings?: {
|
|
22
|
+
[setting: string]: unknown;
|
|
23
|
+
defaultNamespace?: string | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
apiVersion: string;
|
|
21
26
|
urlParser: import("@smithy/types").UrlParser;
|
|
22
27
|
base64Decoder: import("@smithy/types").Decoder;
|
|
23
28
|
base64Encoder: (_input: string | Uint8Array) => string;
|
|
@@ -17,8 +17,13 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
17
17
|
env?: "stage" | "stable" | "prod" | undefined;
|
|
18
18
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
19
19
|
endpoint?: (() => Record<string, string>) | undefined;
|
|
20
|
-
apiVersion: string;
|
|
21
20
|
cacheMiddleware?: boolean | undefined;
|
|
21
|
+
protocol?: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any> | undefined;
|
|
22
|
+
protocolSettings?: {
|
|
23
|
+
[setting: string]: unknown;
|
|
24
|
+
defaultNamespace?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
apiVersion: string;
|
|
22
27
|
urlParser: import("@smithy/types").UrlParser;
|
|
23
28
|
base64Decoder: import("@smithy/types").Decoder;
|
|
24
29
|
base64Encoder: (_input: string | Uint8Array) => string;
|
|
@@ -9,8 +9,13 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
|
|
|
9
9
|
token: import("@wildix/smithy-utils").TokenProvider;
|
|
10
10
|
endpoint?: (() => Record<string, string>) | undefined;
|
|
11
11
|
requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
|
|
12
|
-
apiVersion: string;
|
|
13
12
|
cacheMiddleware?: boolean | undefined;
|
|
13
|
+
protocol?: import("@smithy/types").ClientProtocol<any, any> | import("@smithy/types").$ClientProtocol<any, any> | import("@smithy/types").ClientProtocolCtor<any, any> | import("@smithy/types").$ClientProtocolCtor<any, any> | undefined;
|
|
14
|
+
protocolSettings?: {
|
|
15
|
+
[setting: string]: unknown;
|
|
16
|
+
defaultNamespace?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
apiVersion: string;
|
|
14
19
|
urlParser: import("@smithy/types").UrlParser;
|
|
15
20
|
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
16
21
|
streamCollector: import("@smithy/types").StreamCollector;
|
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
|
|
4
|
+
"version": "0.1.0",
|
|
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",
|