@sap-ai-sdk/document-grounding 1.4.1-20250102013112.0 → 1.4.1-20250104013048.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/README.md +24 -28
- package/dist/client/api/index.d.ts +2 -5
- package/dist/client/api/index.d.ts.map +1 -1
- package/dist/client/api/index.js +3 -6
- package/dist/client/api/index.js.map +1 -1
- package/dist/client/api/pipelines-api.d.ts +6 -5
- package/dist/client/api/pipelines-api.d.ts.map +1 -1
- package/dist/client/api/pipelines-api.js +12 -11
- package/dist/client/api/pipelines-api.js.map +1 -1
- package/dist/client/api/{retrieval-data-repository-api.d.ts → retrieval-api.d.ts} +16 -6
- package/dist/client/api/retrieval-api.d.ts.map +1 -0
- package/dist/client/api/retrieval-api.js +44 -0
- package/dist/client/api/retrieval-api.js.map +1 -0
- package/dist/client/api/schema/collection-created-response.js +1 -1
- package/dist/client/api/schema/collection-deleted-response.js +1 -1
- package/dist/client/api/schema/collection-pending-response.js +1 -1
- package/dist/client/api/schema/data-repository-type.js +1 -1
- package/dist/client/api/schema/details-error-response.js +1 -1
- package/dist/client/api/schema/document-key-value-list-pair.js +1 -1
- package/dist/client/api/schema/embedding-config.js +1 -1
- package/dist/client/api/schema/index.js +1 -1
- package/dist/client/api/schema/key-value-list-pair.js +1 -1
- package/dist/client/api/schema/pipeline-id.js +1 -1
- package/dist/client/api/schema/pipeline-post-requst.js +1 -1
- package/dist/client/api/schema/pipeline-status.js +1 -1
- package/dist/client/api/schema/pipeline.js +1 -1
- package/dist/client/api/schema/retieval-per-filter-search-result-with-error.js +1 -1
- package/dist/client/api/schema/search-configuration.js +1 -1
- package/dist/client/api/schema/search-select-option-enum.js +1 -1
- package/dist/client/api/vector-api.d.ts +131 -0
- package/dist/client/api/vector-api.d.ts.map +1 -0
- package/dist/client/api/vector-api.js +142 -0
- package/dist/client/api/vector-api.js.map +1 -0
- package/package.json +3 -3
- package/dist/client/api/collections-api.d.ts +0 -67
- package/dist/client/api/collections-api.d.ts.map +0 -1
- package/dist/client/api/collections-api.js +0 -73
- package/dist/client/api/collections-api.js.map +0 -1
- package/dist/client/api/documents-api.d.ts +0 -63
- package/dist/client/api/documents-api.d.ts.map +0 -1
- package/dist/client/api/documents-api.js +0 -71
- package/dist/client/api/documents-api.js.map +0 -1
- package/dist/client/api/retrieval-data-repository-api.d.ts.map +0 -1
- package/dist/client/api/retrieval-data-repository-api.js +0 -33
- package/dist/client/api/retrieval-data-repository-api.js.map +0 -1
- package/dist/client/api/retrieval-federated-search-across-data-repositories-api.d.ts +0 -18
- package/dist/client/api/retrieval-federated-search-across-data-repositories-api.d.ts.map +0 -1
- package/dist/client/api/retrieval-federated-search-across-data-repositories-api.js +0 -23
- package/dist/client/api/retrieval-federated-search-across-data-repositories-api.js.map +0 -1
- package/dist/client/api/search-api.d.ts +0 -18
- package/dist/client/api/search-api.d.ts.map +0 -1
- package/dist/client/api/search-api.js +0 -23
- package/dist/client/api/search-api.js.map +0 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ In addition to the examples below, you can find more **sample code** [here](http
|
|
|
47
47
|
```ts
|
|
48
48
|
import
|
|
49
49
|
const response =
|
|
50
|
-
await
|
|
50
|
+
await VectorApi.createCollection(
|
|
51
51
|
{
|
|
52
52
|
title: 'ai-sdk-js-e2e',
|
|
53
53
|
embeddingConfig: {
|
|
@@ -66,27 +66,26 @@ const collectionId = (response.headers.location as string).split('/').at(-2);
|
|
|
66
66
|
### Create a Document
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
|
-
const response: DocumentsListResponse =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
).execute();
|
|
69
|
+
const response: DocumentsListResponse = await VectorApi.createDocuments(
|
|
70
|
+
collectionId,
|
|
71
|
+
{
|
|
72
|
+
documents: [
|
|
73
|
+
{
|
|
74
|
+
metadata: [],
|
|
75
|
+
chunks: [
|
|
76
|
+
{
|
|
77
|
+
content:
|
|
78
|
+
'SAP Cloud SDK for AI is the official Software Development Kit (SDK) for SAP AI Core, SAP Generative AI Hub, and Orchestration Service.',
|
|
79
|
+
metadata: []
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
'AI-Resource-Group': 'default'
|
|
87
|
+
}
|
|
88
|
+
).execute();
|
|
90
89
|
```
|
|
91
90
|
|
|
92
91
|
### Custom Destination
|
|
@@ -95,12 +94,9 @@ When calling the `execute()` method, it is possible to provide a custom destinat
|
|
|
95
94
|
For example, when querying deployments targeting a destination with the name `my-destination`, the following code can be used:
|
|
96
95
|
|
|
97
96
|
```ts
|
|
98
|
-
const response = await
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
'AI-Resource-Group': 'default'
|
|
102
|
-
}
|
|
103
|
-
).execute({
|
|
97
|
+
const response = await VectorApi.deleteCollectionById(collectionId, {
|
|
98
|
+
'AI-Resource-Group': 'default'
|
|
99
|
+
}).execute({
|
|
104
100
|
destinationName: 'my-destination'
|
|
105
101
|
});
|
|
106
102
|
```
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export * from './pipelines-api.js';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './search-api.js';
|
|
5
|
-
export * from './retrieval-data-repository-api.js';
|
|
6
|
-
export * from './retrieval-federated-search-across-data-repositories-api.js';
|
|
2
|
+
export * from './vector-api.js';
|
|
3
|
+
export * from './retrieval-api.js';
|
|
7
4
|
export * from './schema/index.js';
|
|
8
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAKA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
package/dist/client/api/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
|
|
5
5
|
*/
|
|
6
6
|
export * from './pipelines-api.js';
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './search-api.js';
|
|
10
|
-
export * from './retrieval-data-repository-api.js';
|
|
11
|
-
export * from './retrieval-federated-search-across-data-repositories-api.js';
|
|
7
|
+
export * from './vector-api.js';
|
|
8
|
+
export * from './retrieval-api.js';
|
|
12
9
|
export * from './schema/index.js';
|
|
13
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/api/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -5,13 +5,14 @@ import type { Pipelines, PipelinePostRequst, PipelineId, Pipeline, PipelineStatu
|
|
|
5
5
|
* This API is part of the 'api' service.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PipelinesApi: {
|
|
8
|
+
_defaultBasePath: string;
|
|
8
9
|
/**
|
|
9
10
|
* Get all pipelines
|
|
10
11
|
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
11
12
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
12
13
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
getAllPipelines: (queryParameters: {
|
|
15
16
|
$top?: number;
|
|
16
17
|
$skip?: number;
|
|
17
18
|
$count?: boolean;
|
|
@@ -24,7 +25,7 @@ export declare const PipelinesApi: {
|
|
|
24
25
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
25
26
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
createPipeline: (body: PipelinePostRequst, headerParameters: {
|
|
28
29
|
"AI-Resource-Group": string;
|
|
29
30
|
}) => OpenApiRequestBuilder<PipelineId>;
|
|
30
31
|
/**
|
|
@@ -33,7 +34,7 @@ export declare const PipelinesApi: {
|
|
|
33
34
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
34
35
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
35
36
|
*/
|
|
36
|
-
|
|
37
|
+
getPipelineById: (pipelineId: string, headerParameters: {
|
|
37
38
|
"AI-Resource-Group": string;
|
|
38
39
|
}) => OpenApiRequestBuilder<Pipeline>;
|
|
39
40
|
/**
|
|
@@ -42,7 +43,7 @@ export declare const PipelinesApi: {
|
|
|
42
43
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
43
44
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
+
deletePipelineById: (pipelineId: string, headerParameters: {
|
|
46
47
|
"AI-Resource-Group": string;
|
|
47
48
|
}) => OpenApiRequestBuilder<any>;
|
|
48
49
|
/**
|
|
@@ -51,7 +52,7 @@ export declare const PipelinesApi: {
|
|
|
51
52
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
52
53
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
53
54
|
*/
|
|
54
|
-
|
|
55
|
+
getPipelineStatus: (pipelineId: string, headerParameters: {
|
|
55
56
|
"AI-Resource-Group": string;
|
|
56
57
|
}) => OpenApiRequestBuilder<PipelineStatus>;
|
|
57
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelines-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/pipelines-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,QAAQ,EACR,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"pipelines-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/pipelines-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,QAAQ,EACR,cAAc,EACf,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,YAAY;;IAEvB;;;;;OAKG;uCAEgB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;2BAEK,kBAAkB,oBACN;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;kCAEW,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;qCAEW,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;oCAEW,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;CAWpD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
|
|
5
5
|
*/
|
|
@@ -9,55 +9,56 @@ import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
|
|
|
9
9
|
* This API is part of the 'api' service.
|
|
10
10
|
*/
|
|
11
11
|
export const PipelinesApi = {
|
|
12
|
+
_defaultBasePath: '/lm/document-grounding',
|
|
12
13
|
/**
|
|
13
14
|
* Get all pipelines
|
|
14
15
|
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
15
16
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
16
17
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
getAllPipelines: (queryParameters, headerParameters) => new OpenApiRequestBuilder('get', '/pipelines', {
|
|
19
20
|
queryParameters,
|
|
20
21
|
headerParameters
|
|
21
|
-
}),
|
|
22
|
+
}, PipelinesApi._defaultBasePath),
|
|
22
23
|
/**
|
|
23
24
|
* Create a pipeline
|
|
24
25
|
* @param body - Request body.
|
|
25
26
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
26
27
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
27
28
|
*/
|
|
28
|
-
|
|
29
|
+
createPipeline: (body, headerParameters) => new OpenApiRequestBuilder('post', '/pipelines', {
|
|
29
30
|
body,
|
|
30
31
|
headerParameters
|
|
31
|
-
}),
|
|
32
|
+
}, PipelinesApi._defaultBasePath),
|
|
32
33
|
/**
|
|
33
34
|
* Get details of a pipeline by pipeline id
|
|
34
35
|
* @param pipelineId - The ID of the pipeline to get.
|
|
35
36
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
36
37
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
getPipelineById: (pipelineId, headerParameters) => new OpenApiRequestBuilder('get', '/pipelines/{pipelineId}', {
|
|
39
40
|
pathParameters: { pipelineId },
|
|
40
41
|
headerParameters
|
|
41
|
-
}),
|
|
42
|
+
}, PipelinesApi._defaultBasePath),
|
|
42
43
|
/**
|
|
43
44
|
* Delete a pipeline by pipeline id
|
|
44
45
|
* @param pipelineId - The ID of the pipeline to delete.
|
|
45
46
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
46
47
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
47
48
|
*/
|
|
48
|
-
|
|
49
|
+
deletePipelineById: (pipelineId, headerParameters) => new OpenApiRequestBuilder('delete', '/pipelines/{pipelineId}', {
|
|
49
50
|
pathParameters: { pipelineId },
|
|
50
51
|
headerParameters
|
|
51
|
-
}),
|
|
52
|
+
}, PipelinesApi._defaultBasePath),
|
|
52
53
|
/**
|
|
53
54
|
* Get pipeline status by pipeline id
|
|
54
55
|
* @param pipelineId - The ID of the pipeline to get status.
|
|
55
56
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
56
57
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
57
58
|
*/
|
|
58
|
-
|
|
59
|
+
getPipelineStatus: (pipelineId, headerParameters) => new OpenApiRequestBuilder('get', '/pipelines/{pipelineId}/status', {
|
|
59
60
|
pathParameters: { pipelineId },
|
|
60
61
|
headerParameters
|
|
61
|
-
})
|
|
62
|
+
}, PipelinesApi._defaultBasePath)
|
|
62
63
|
};
|
|
63
64
|
//# sourceMappingURL=pipelines-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipelines-api.js","sourceRoot":"","sources":["../../../src/client/api/pipelines-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAQzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"pipelines-api.js","sourceRoot":"","sources":["../../../src/client/api/pipelines-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAQzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gBAAgB,EAAE,wBAAwB;IAC1C;;;;;OAKG;IACH,eAAe,EAAE,CACf,eAAoE,EACpE,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,YAAY,EACZ;QACE,eAAe;QACf,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,cAAc,EAAE,CACd,IAAwB,EACxB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,MAAM,EACN,YAAY,EACZ;QACE,IAAI;QACJ,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,eAAe,EAAE,CACf,UAAkB,EAClB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,yBAAyB,EACzB;QACE,cAAc,EAAE,EAAE,UAAU,EAAE;QAC9B,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,kBAAkB,EAAE,CAClB,UAAkB,EAClB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,QAAQ,EACR,yBAAyB,EACzB;QACE,cAAc,EAAE,EAAE,UAAU,EAAE;QAC9B,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,iBAAiB,EAAE,CACjB,UAAkB,EAClB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,gCAAgC,EAChC;QACE,cAAc,EAAE,EAAE,UAAU,EAAE;QAC9B,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;CACJ,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
|
|
2
|
-
import type { DataRepositories, DataRepository } from './schema/index.js';
|
|
2
|
+
import type { DataRepositories, DataRepository, RetrievalSearchInput, RetievalSearchResults } from './schema/index.js';
|
|
3
3
|
/**
|
|
4
|
-
* Representation of the '
|
|
4
|
+
* Representation of the 'RetrievalApi'.
|
|
5
5
|
* This API is part of the 'api' service.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const RetrievalApi: {
|
|
8
|
+
_defaultBasePath: string;
|
|
8
9
|
/**
|
|
9
10
|
* List all DataRepository objects.
|
|
10
11
|
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
11
12
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
12
13
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
getDataRepositories: (queryParameters: {
|
|
15
16
|
$top?: number;
|
|
16
17
|
$skip?: number;
|
|
17
18
|
$count?: boolean;
|
|
@@ -24,8 +25,17 @@ export declare const RetrievalDataRepositoryApi: {
|
|
|
24
25
|
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
25
26
|
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
+
getDataRepositoryById: (repositoryId: string, headerParameters: {
|
|
28
29
|
"AI-Resource-Group": string;
|
|
29
30
|
}) => OpenApiRequestBuilder<DataRepository>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve relevant content given a query string.
|
|
33
|
+
* @param body - Request body.
|
|
34
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
35
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
36
|
+
*/
|
|
37
|
+
search: (body: RetrievalSearchInput, headerParameters: {
|
|
38
|
+
"AI-Resource-Group": string;
|
|
39
|
+
}) => OpenApiRequestBuilder<RetievalSearchResults>;
|
|
30
40
|
};
|
|
31
|
-
//# sourceMappingURL=retrieval-
|
|
41
|
+
//# sourceMappingURL=retrieval-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieval-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/retrieval-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,YAAY;;IAEvB;;;;;OAKG;2CAEgB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;0CAEa,MAAM,oBACF;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;mBAEK,oBAAoB,oBACR;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;CAWpD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This is a generated file powered by the SAP Cloud SDK for JavaScript.
|
|
5
|
+
*/
|
|
6
|
+
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
|
|
7
|
+
/**
|
|
8
|
+
* Representation of the 'RetrievalApi'.
|
|
9
|
+
* This API is part of the 'api' service.
|
|
10
|
+
*/
|
|
11
|
+
export const RetrievalApi = {
|
|
12
|
+
_defaultBasePath: '/lm/document-grounding',
|
|
13
|
+
/**
|
|
14
|
+
* List all DataRepository objects.
|
|
15
|
+
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
16
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
17
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
18
|
+
*/
|
|
19
|
+
getDataRepositories: (queryParameters, headerParameters) => new OpenApiRequestBuilder('get', '/retrieval/dataRepositories', {
|
|
20
|
+
queryParameters,
|
|
21
|
+
headerParameters
|
|
22
|
+
}, RetrievalApi._defaultBasePath),
|
|
23
|
+
/**
|
|
24
|
+
* List single DataRepository object.
|
|
25
|
+
* @param repositoryId - Path parameter.
|
|
26
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
27
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
28
|
+
*/
|
|
29
|
+
getDataRepositoryById: (repositoryId, headerParameters) => new OpenApiRequestBuilder('get', '/retrieval/dataRepositories/{repositoryId}', {
|
|
30
|
+
pathParameters: { repositoryId },
|
|
31
|
+
headerParameters
|
|
32
|
+
}, RetrievalApi._defaultBasePath),
|
|
33
|
+
/**
|
|
34
|
+
* Retrieve relevant content given a query string.
|
|
35
|
+
* @param body - Request body.
|
|
36
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
37
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
38
|
+
*/
|
|
39
|
+
search: (body, headerParameters) => new OpenApiRequestBuilder('post', '/retrieval/search', {
|
|
40
|
+
body,
|
|
41
|
+
headerParameters
|
|
42
|
+
}, RetrievalApi._defaultBasePath)
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=retrieval-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieval-api.js","sourceRoot":"","sources":["../../../src/client/api/retrieval-api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAOzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,gBAAgB,EAAE,wBAAwB;IAC1C;;;;;OAKG;IACH,mBAAmB,EAAE,CACnB,eAAoE,EACpE,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,6BAA6B,EAC7B;QACE,eAAe;QACf,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,qBAAqB,EAAE,CACrB,YAAoB,EACpB,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,KAAK,EACL,4CAA4C,EAC5C;QACE,cAAc,EAAE,EAAE,YAAY,EAAE;QAChC,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;IACH;;;;;OAKG;IACH,MAAM,EAAE,CACN,IAA0B,EAC1B,gBAAiD,EACjD,EAAE,CACF,IAAI,qBAAqB,CACvB,MAAM,EACN,mBAAmB,EACnB;QACE,IAAI;QACJ,gBAAgB;KACjB,EACD,YAAY,CAAC,gBAAgB,CAC9B;CACJ,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { OpenApiRequestBuilder } from '@sap-ai-sdk/core';
|
|
2
|
+
import type { CollectionsListResponse, CollectionRequest, Collection, DocumentResponse, Documents, DocumentCreateRequest, DocumentsListResponse, DocumentUpdateRequest, TextSearchRequest, SearchResults, CollectionCreatedResponse, CollectionPendingResponse, CollectionDeletedResponse } from './schema/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Representation of the 'VectorApi'.
|
|
5
|
+
* This API is part of the 'api' service.
|
|
6
|
+
*/
|
|
7
|
+
export declare const VectorApi: {
|
|
8
|
+
_defaultBasePath: string;
|
|
9
|
+
/**
|
|
10
|
+
* Gets a list of collections.
|
|
11
|
+
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
12
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
13
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
14
|
+
*/
|
|
15
|
+
getAllCollections: (queryParameters: {
|
|
16
|
+
$top?: number;
|
|
17
|
+
$skip?: number;
|
|
18
|
+
$count?: boolean;
|
|
19
|
+
}, headerParameters: {
|
|
20
|
+
"AI-Resource-Group": string;
|
|
21
|
+
}) => OpenApiRequestBuilder<CollectionsListResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a collection. This operation is asynchronous. Poll the collection resource and check the status field to understand creation status.
|
|
24
|
+
* @param body - Request body.
|
|
25
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
26
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
27
|
+
*/
|
|
28
|
+
createCollection: (body: CollectionRequest, headerParameters: {
|
|
29
|
+
"AI-Resource-Group": string;
|
|
30
|
+
}) => OpenApiRequestBuilder<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets a specific collection by ID.
|
|
33
|
+
* @param collectionId - Path parameter.
|
|
34
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
35
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
36
|
+
*/
|
|
37
|
+
getCollectionById: (collectionId: string, headerParameters: {
|
|
38
|
+
"AI-Resource-Group": string;
|
|
39
|
+
}) => OpenApiRequestBuilder<Collection>;
|
|
40
|
+
/**
|
|
41
|
+
* Deletes a specific collection by ID. This operation is asynchronous. Poll the collection for a 404 status code.
|
|
42
|
+
* @param collectionId - Path parameter.
|
|
43
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
44
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
45
|
+
*/
|
|
46
|
+
deleteCollectionById: (collectionId: string, headerParameters: {
|
|
47
|
+
"AI-Resource-Group": string;
|
|
48
|
+
}) => OpenApiRequestBuilder<any>;
|
|
49
|
+
/**
|
|
50
|
+
* Gets a specific document in a collection by ID.
|
|
51
|
+
* @param collectionId - Path parameter.
|
|
52
|
+
* @param documentId - Path parameter.
|
|
53
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
54
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
55
|
+
*/
|
|
56
|
+
getDocumentById: (collectionId: string, documentId: string, headerParameters: {
|
|
57
|
+
"AI-Resource-Group": string;
|
|
58
|
+
}) => OpenApiRequestBuilder<DocumentResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Deletes a specific document of a collection.
|
|
61
|
+
* @param collectionId - Path parameter.
|
|
62
|
+
* @param documentId - Path parameter.
|
|
63
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
64
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
65
|
+
*/
|
|
66
|
+
deleteDocumentById: (collectionId: string, documentId: string, headerParameters: {
|
|
67
|
+
"AI-Resource-Group": string;
|
|
68
|
+
}) => OpenApiRequestBuilder<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Gets a list of documents of a collection.
|
|
71
|
+
* @param collectionId - Path parameter.
|
|
72
|
+
* @param queryParameters - Object containing the following keys: $top, $skip, $count.
|
|
73
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
74
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
75
|
+
*/
|
|
76
|
+
getAllDocuments: (collectionId: string, queryParameters: {
|
|
77
|
+
$top?: number;
|
|
78
|
+
$skip?: number;
|
|
79
|
+
$count?: boolean;
|
|
80
|
+
}, headerParameters: {
|
|
81
|
+
"AI-Resource-Group": string;
|
|
82
|
+
}) => OpenApiRequestBuilder<Documents>;
|
|
83
|
+
/**
|
|
84
|
+
* Create and stores one or multiple documents into a collection. If omitted, 'id' will be auto-generated.
|
|
85
|
+
* @param collectionId - Path parameter.
|
|
86
|
+
* @param body - Request body.
|
|
87
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
88
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
89
|
+
*/
|
|
90
|
+
createDocuments: (collectionId: string, body: DocumentCreateRequest, headerParameters: {
|
|
91
|
+
"AI-Resource-Group": string;
|
|
92
|
+
}) => OpenApiRequestBuilder<DocumentsListResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Upserts the data of multiple documents into a collection.
|
|
95
|
+
* @param collectionId - Path parameter.
|
|
96
|
+
* @param body - Request body.
|
|
97
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
98
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
99
|
+
*/
|
|
100
|
+
updateDocuments: (collectionId: string, body: DocumentUpdateRequest, headerParameters: {
|
|
101
|
+
"AI-Resource-Group": string;
|
|
102
|
+
}) => OpenApiRequestBuilder<DocumentsListResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* Search chunk by vector
|
|
105
|
+
* @param body - Request body.
|
|
106
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
107
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
108
|
+
*/
|
|
109
|
+
search: (body: TextSearchRequest, headerParameters: {
|
|
110
|
+
"AI-Resource-Group": string;
|
|
111
|
+
}) => OpenApiRequestBuilder<SearchResults>;
|
|
112
|
+
/**
|
|
113
|
+
* Gets a specific collection status from monitor by ID.
|
|
114
|
+
* @param id - Path parameter.
|
|
115
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
116
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
117
|
+
*/
|
|
118
|
+
getCollectionCreationStatus: (id: string, headerParameters: {
|
|
119
|
+
"AI-Resource-Group": string;
|
|
120
|
+
}) => OpenApiRequestBuilder<CollectionCreatedResponse | CollectionPendingResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* Gets a specific collection status from monitor by ID.
|
|
123
|
+
* @param id - Path parameter.
|
|
124
|
+
* @param headerParameters - Object containing the following keys: AI-Resource-Group.
|
|
125
|
+
* @returns The request builder, use the `execute()` method to trigger the request.
|
|
126
|
+
*/
|
|
127
|
+
getCollectionDeletionStatus: (id: string, headerParameters: {
|
|
128
|
+
"AI-Resource-Group": string;
|
|
129
|
+
}) => OpenApiRequestBuilder<CollectionPendingResponse | CollectionDeletedResponse>;
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=vector-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vector-api.d.ts","sourceRoot":"","sources":["../../../src/client/api/vector-api.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,SAAS,EACT,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B;;;GAGG;AACH,eAAO,MAAM,SAAS;;IAEpB;;;;;OAKG;yCAEgB;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;6BAEK,iBAAiB,oBACL;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;sCAEa,MAAM,oBACF;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;yCAEa,MAAM,oBACF;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;;OAMG;oCAEa,MAAM,cACR,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;;OAMG;uCAEa,MAAM,cACR,MAAM,oBACA;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;;OAMG;oCAEa,MAAM,mBACH;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,oBAClD;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAYnD;;;;;;OAMG;oCAEa,MAAM,QACd,qBAAqB,oBACT;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAYnD;;;;;;OAMG;oCAEa,MAAM,QACd,qBAAqB,oBACT;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAYnD;;;;;OAKG;mBAEK,iBAAiB,oBACL;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAWnD;;;;;OAKG;sCAEG,MAAM,oBACQ;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;IAanD;;;;;OAKG;sCAEG,MAAM,oBACQ;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE;CAapD,CAAC"}
|