@mcp-abap-adt/sap-aicore-embedder 28.0.0 → 30.0.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 +28 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/orchestration-embedder.d.ts +10 -0
- package/dist/orchestration-embedder.d.ts.map +1 -1
- package/dist/orchestration-embedder.js +7 -2
- package/dist/orchestration-embedder.js.map +1 -1
- package/dist/sap-ai-core-embedder.d.ts +9 -0
- package/dist/sap-ai-core-embedder.d.ts.map +1 -1
- package/dist/sap-ai-core-embedder.js +8 -1
- package/dist/sap-ai-core-embedder.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -93,6 +93,34 @@ documented AI Core limit for the OpenAI family has been verified, so none is
|
|
|
93
93
|
asserted. Override either with `rag.maxBatchSize` in YAML when the tenant's real
|
|
94
94
|
quota is stricter than the model's documented limit.
|
|
95
95
|
|
|
96
|
+
### Asymmetric models (`type: document | query`)
|
|
97
|
+
|
|
98
|
+
Retrieval models such as `nvidia--llama-3.2-nv-embedqa-1b` embed stored text and
|
|
99
|
+
search text differently and refuse a call without an input `type`. Build the
|
|
100
|
+
model twice — `inputType: 'document'` and `'query'` — and give the two to
|
|
101
|
+
`asymmetricEmbedder` (`@mcp-abap-adt/llm-agent`). The result is ONE
|
|
102
|
+
`IRetrievalEmbedder`: a store writes through its `embedDocument` and searches
|
|
103
|
+
through its `embedQuery`, so neither job can be done with the other's instance.
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import { asymmetricEmbedder } from '@mcp-abap-adt/llm-agent';
|
|
107
|
+
import { SapAiCoreEmbedder } from '@mcp-abap-adt/sap-aicore-embedder';
|
|
108
|
+
|
|
109
|
+
const config = {
|
|
110
|
+
model: 'nvidia--llama-3.2-nv-embedqa-1b',
|
|
111
|
+
...serviceKeyCredential(process.env.AICORE_SERVICE_KEY!),
|
|
112
|
+
};
|
|
113
|
+
const embedder = asymmetricEmbedder({
|
|
114
|
+
document: new SapAiCoreEmbedder({ ...config, inputType: 'document' }),
|
|
115
|
+
query: new SapAiCoreEmbedder({ ...config, inputType: 'query' }),
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
A symmetric model (`text-embedding-3-*`, `gemini-embedding`,
|
|
120
|
+
`amazon--titan-embed-text`) is one instance: `symmetricEmbedder(new
|
|
121
|
+
SapAiCoreEmbedder(config))`. `inputType` works with the orchestration scenario
|
|
122
|
+
only — with `scenario: 'foundation-models'` it is refused at construction.
|
|
123
|
+
|
|
96
124
|
## Authentication
|
|
97
125
|
|
|
98
126
|
Neither scenario reads an environment variable inside this package — the
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { SapAiCoreEmbedderInputType } from './orchestration-embedder.js';
|
|
1
2
|
export type { SapAiCoreEmbedderConfig, SapAiCoreEmbedderScenario, } from './sap-ai-core-embedder.js';
|
|
2
3
|
export { SapAiCoreEmbedder } from './sap-ai-core-embedder.js';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,YAAY,EACV,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -16,7 +16,15 @@ export interface OrchestrationScenarioEmbedderConfig {
|
|
|
16
16
|
* (§4.6.3) — its own field, the name `parseServiceKey` returns.
|
|
17
17
|
*/
|
|
18
18
|
apiBaseUrl: string;
|
|
19
|
+
/**
|
|
20
|
+
* The input `type` asymmetric retrieval models require (e.g.
|
|
21
|
+
* `nvidia--llama-3.2-nv-embedqa-1b`: `document` for stored text, `query` for
|
|
22
|
+
* search text). Sent on every call when set; unset, none is sent.
|
|
23
|
+
*/
|
|
24
|
+
inputType?: SapAiCoreEmbedderInputType;
|
|
19
25
|
}
|
|
26
|
+
/** The input types an asymmetric embedding model distinguishes. */
|
|
27
|
+
export type SapAiCoreEmbedderInputType = 'document' | 'query';
|
|
20
28
|
/** The constructed-destination shape the SAP AI SDK documents. */
|
|
21
29
|
export interface OrchestrationEmbedderDestination {
|
|
22
30
|
url: string;
|
|
@@ -28,7 +36,9 @@ export declare class OrchestrationScenarioEmbedder implements IEmbedderBatch {
|
|
|
28
36
|
private readonly resourceGroup?;
|
|
29
37
|
private readonly apiBaseUrl;
|
|
30
38
|
private readonly credential;
|
|
39
|
+
private readonly inputType?;
|
|
31
40
|
constructor(config: OrchestrationScenarioEmbedderConfig);
|
|
41
|
+
private typed;
|
|
32
42
|
embed(text: string, _options?: CallOptions): Promise<IEmbedResult>;
|
|
33
43
|
embedBatch(texts: string[], _options?: CallOptions): Promise<IEmbedResult[]>;
|
|
34
44
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-embedder.d.ts","sourceRoot":"","sources":["../src/orchestration-embedder.ts"],"names":[],"mappings":"A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Q,CAAC,aAAa,CAAC,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAA6B;gBAE5C,MAAM,EAAE,mCAAmC;IAQvD,OAAO,CAAC,KAAK;IAIP,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAclE,UAAU,CACd,KAAK,EAAE,MAAM,EAAE,EACf,QAAQ,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,YAAY,EAAE,CAAC;IAgB1B;;;;;;;;;OASG;YACW,YAAY;CAY3B"}
|
|
@@ -19,11 +19,16 @@ export class OrchestrationScenarioEmbedder {
|
|
|
19
19
|
resourceGroup;
|
|
20
20
|
apiBaseUrl;
|
|
21
21
|
credential;
|
|
22
|
+
inputType;
|
|
22
23
|
constructor(config) {
|
|
23
24
|
this.model = config.model;
|
|
24
25
|
this.resourceGroup = config.resourceGroup;
|
|
25
26
|
this.apiBaseUrl = config.apiBaseUrl;
|
|
26
27
|
this.credential = config.credential;
|
|
28
|
+
this.inputType = config.inputType;
|
|
29
|
+
}
|
|
30
|
+
typed(input) {
|
|
31
|
+
return this.inputType ? { input, type: this.inputType } : { input };
|
|
27
32
|
}
|
|
28
33
|
async embed(text, _options) {
|
|
29
34
|
const destination = await buildDestination({
|
|
@@ -31,7 +36,7 @@ export class OrchestrationScenarioEmbedder {
|
|
|
31
36
|
credential: this.credential,
|
|
32
37
|
});
|
|
33
38
|
const client = await this.createClient(destination);
|
|
34
|
-
const response = await client.embed(
|
|
39
|
+
const response = await client.embed(this.typed(text));
|
|
35
40
|
const embeddings = response.getEmbeddings();
|
|
36
41
|
if (!embeddings || embeddings.length === 0) {
|
|
37
42
|
throw new RagError('No embeddings returned from SAP AI Core');
|
|
@@ -46,7 +51,7 @@ export class OrchestrationScenarioEmbedder {
|
|
|
46
51
|
credential: this.credential,
|
|
47
52
|
});
|
|
48
53
|
const client = await this.createClient(destination);
|
|
49
|
-
const response = await client.embed(
|
|
54
|
+
const response = await client.embed(this.typed(texts));
|
|
50
55
|
const embeddings = response.getEmbeddings();
|
|
51
56
|
if (!embeddings || embeddings.length === 0) {
|
|
52
57
|
throw new RagError('No embeddings returned from SAP AI Core batch');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestration-embedder.js","sourceRoot":"","sources":["../src/orchestration-embedder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestration-embedder.js","sourceRoot":"","sources":["../src/orchestration-embedder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAmCxD;;;;;;GAMG;AACH,KAAK,UAAU,gBAAgB,CAAC,GAG/B;IACC,OAAO;QACL,GAAG,EAAE,GAAG,CAAC,UAAU;QACnB,cAAc,EAAE,kBAAkB;QAClC,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,MAAM,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE;KACrE,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,6BAA6B;IACvB,KAAK,CAAS;IACd,aAAa,CAAU;IACvB,UAAU,CAAS;IACnB,UAAU,CAAoB;IAC9B,SAAS,CAA8B;IAExD,YAAY,MAA2C;QACrD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,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-agent';
|
|
3
|
+
import { type SapAiCoreEmbedderInputType } from './orchestration-embedder.js';
|
|
3
4
|
export type SapAiCoreEmbedderScenario = 'foundation-models' | 'orchestration';
|
|
4
5
|
export interface SapAiCoreEmbedderConfig {
|
|
5
6
|
/** Embedding model name (e.g. 'text-embedding-3-small', 'gemini-embedding') */
|
|
@@ -27,6 +28,14 @@ export interface SapAiCoreEmbedderConfig {
|
|
|
27
28
|
* `scenario`). Not part of the credential (§4.6.3).
|
|
28
29
|
*/
|
|
29
30
|
apiBaseUrl: string;
|
|
31
|
+
/**
|
|
32
|
+
* The input `type` an asymmetric retrieval model requires (`document` for
|
|
33
|
+
* stored text, `query` for search text). Orchestration scenario only; unset,
|
|
34
|
+
* none is sent. An asymmetric model is two instances on the same model —
|
|
35
|
+
* `inputType: 'document'` and `'query'` — joined by `asymmetricEmbedder`
|
|
36
|
+
* (`@mcp-abap-adt/llm-agent`).
|
|
37
|
+
*/
|
|
38
|
+
inputType?: SapAiCoreEmbedderInputType;
|
|
30
39
|
}
|
|
31
40
|
export declare class SapAiCoreEmbedder implements IEmbedderBatch {
|
|
32
41
|
private readonly backend;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sap-ai-core-embedder.d.ts","sourceRoot":"","sources":["../src/sap-ai-core-embedder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"sap-ai-core-embedder.d.ts","sourceRoot":"","sources":["../src/sap-ai-core-embedder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,yBAAyB,GAAG,mBAAmB,GAAG,eAAe,CAAC;AAE9E,MAAM,WAAW,uBAAuB;IACtC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC;;;;OAIG;IACH,UAAU,EAAE,iBAAiB,CAAC;IAC9B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,0BAA0B,CAAC;CACxC;AAED,qBAAa,iBAAkB,YAAW,cAAc;IACtD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;gBAE7B,MAAM,EAAE,uBAAuB;IA4B3C,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAIjE,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;CAG5E"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { FoundationModelsEmbedder } from './foundation-embedder.js';
|
|
2
|
-
import { OrchestrationScenarioEmbedder } from './orchestration-embedder.js';
|
|
2
|
+
import { OrchestrationScenarioEmbedder, } from './orchestration-embedder.js';
|
|
3
3
|
export class SapAiCoreEmbedder {
|
|
4
4
|
backend;
|
|
5
5
|
constructor(config) {
|
|
6
6
|
const scenario = config.scenario ?? 'orchestration';
|
|
7
|
+
if (config.inputType !== undefined && scenario !== 'orchestration') {
|
|
8
|
+
// Said and not supported is an error, not a silent drop.
|
|
9
|
+
throw new Error(`SapAiCoreEmbedder: inputType is supported with scenario 'orchestration' only, not '${scenario}'`);
|
|
10
|
+
}
|
|
7
11
|
if (scenario === 'orchestration') {
|
|
8
12
|
this.backend = new OrchestrationScenarioEmbedder({
|
|
9
13
|
model: config.model,
|
|
10
14
|
resourceGroup: config.resourceGroup,
|
|
11
15
|
credential: config.credential,
|
|
12
16
|
apiBaseUrl: config.apiBaseUrl,
|
|
17
|
+
...(config.inputType !== undefined
|
|
18
|
+
? { inputType: config.inputType }
|
|
19
|
+
: {}),
|
|
13
20
|
});
|
|
14
21
|
}
|
|
15
22
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sap-ai-core-embedder.js","sourceRoot":"","sources":["../src/sap-ai-core-embedder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"sap-ai-core-embedder.js","sourceRoot":"","sources":["../src/sap-ai-core-embedder.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EACL,6BAA6B,GAE9B,MAAM,6BAA6B,CAAC;AAwCrC,MAAM,OAAO,iBAAiB;IACX,OAAO,CAAiB;IAEzC,YAAY,MAA+B;QACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,eAAe,CAAC;QACpD,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,QAAQ,KAAK,eAAe,EAAE,CAAC;YACnE,yDAAyD;YACzD,MAAM,IAAI,KAAK,CACb,sFAAsF,QAAQ,GAAG,CAClG,CAAC;QACJ,CAAC;QACD,IAAI,QAAQ,KAAK,eAAe,EAAE,CAAC;YACjC,IAAI,CAAC,OAAO,GAAG,IAAI,6BAA6B,CAAC;gBAC/C,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,GAAG,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS;oBAChC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE;oBACjC,CAAC,CAAC,EAAE,CAAC;aACR,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAwB,CAAC;gBAC1C,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAY,EAAE,OAAqB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,UAAU,CAAC,KAAe,EAAE,OAAqB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-abap-adt/sap-aicore-embedder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "30.0.0",
|
|
4
4
|
"description": "SAP AI Core embedding provider (IEmbedder) for @mcp-abap-adt/llm-agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@mcp-abap-adt/interfaces-auth": "^2.1.0",
|
|
39
|
-
"@mcp-abap-adt/llm-agent": "^
|
|
40
|
-
"@mcp-abap-adt/sap-aicore-auth": "^
|
|
39
|
+
"@mcp-abap-adt/llm-agent": "^30.0.0",
|
|
40
|
+
"@mcp-abap-adt/sap-aicore-auth": "^30.0.0"
|
|
41
41
|
}
|
|
42
42
|
}
|