@jerome-benoit/sap-ai-provider 4.4.18 → 4.6.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.
Files changed (31) hide show
  1. package/README.md +16 -9
  2. package/dist/{chunk-BBWFNLML.js → chunk-BV5Y6RMC.js} +3 -3
  3. package/dist/{chunk-O6ASHXPO.js → chunk-DBAIFR3B.js} +445 -321
  4. package/dist/{chunk-O6ASHXPO.js.map → chunk-DBAIFR3B.js.map} +1 -1
  5. package/dist/{chunk-SD6CRCHX.js → chunk-DQXZH6CW.js} +50 -43
  6. package/dist/chunk-DQXZH6CW.js.map +1 -0
  7. package/dist/{chunk-4CAVT2YC.js → chunk-KS5QNMYZ.js} +193 -146
  8. package/dist/chunk-KS5QNMYZ.js.map +1 -0
  9. package/dist/{chunk-3M6NFVCS.js → chunk-WYDTQDMJ.js} +11 -5
  10. package/dist/chunk-WYDTQDMJ.js.map +1 -0
  11. package/dist/{foundation-models-embedding-model-strategy-XJV5REFR.js → foundation-models-embedding-model-strategy-XLD3PGCK.js} +4 -4
  12. package/dist/{foundation-models-language-model-strategy-X6VNJZFG.js → foundation-models-language-model-strategy-SNBZBWX4.js} +12 -7
  13. package/dist/foundation-models-language-model-strategy-SNBZBWX4.js.map +1 -0
  14. package/dist/index.cjs +714 -509
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +19 -2
  17. package/dist/index.d.ts +19 -2
  18. package/dist/index.js +6 -6
  19. package/dist/index.js.map +1 -1
  20. package/dist/{orchestration-embedding-model-strategy-3GIX5HAR.js → orchestration-embedding-model-strategy-6BKD5NW7.js} +4 -4
  21. package/dist/{orchestration-language-model-strategy-GYBTFP2F.js → orchestration-language-model-strategy-OYSEPGQG.js} +23 -6
  22. package/dist/orchestration-language-model-strategy-OYSEPGQG.js.map +1 -0
  23. package/package.json +20 -20
  24. package/dist/chunk-3M6NFVCS.js.map +0 -1
  25. package/dist/chunk-4CAVT2YC.js.map +0 -1
  26. package/dist/chunk-SD6CRCHX.js.map +0 -1
  27. package/dist/foundation-models-language-model-strategy-X6VNJZFG.js.map +0 -1
  28. package/dist/orchestration-language-model-strategy-GYBTFP2F.js.map +0 -1
  29. /package/dist/{chunk-BBWFNLML.js.map → chunk-BV5Y6RMC.js.map} +0 -0
  30. /package/dist/{foundation-models-embedding-model-strategy-XJV5REFR.js.map → foundation-models-embedding-model-strategy-XLD3PGCK.js.map} +0 -0
  31. /package/dist/{orchestration-embedding-model-strategy-3GIX5HAR.js.map → orchestration-embedding-model-strategy-6BKD5NW7.js.map} +0 -0
package/README.md CHANGED
@@ -21,6 +21,7 @@ SAP's enterprise-grade AI models through the familiar Vercel AI SDK interface.
21
21
  - [Option 1: Factory Function (Recommended for Custom Configuration)](#option-1-factory-function-recommended-for-custom-configuration)
22
22
  - [API Selection](#api-selection)
23
23
  - [Option 2: Default Instance (Quick Start)](#option-2-default-instance-quick-start)
24
+ - [Provider Methods](#provider-methods)
24
25
  - [Authentication](#authentication)
25
26
  - [Basic Usage](#basic-usage)
26
27
  - [Text Generation](#text-generation)
@@ -264,15 +265,21 @@ const embeddingModel = provider.embedding("text-embedding-3-small");
264
265
 
265
266
  **Available methods:**
266
267
 
267
- | Method | Description |
268
- | ---------------------------------- | --------------------------------------------- |
269
- | `provider(modelId)` | Callable syntax, creates language model |
270
- | `provider.chat(modelId)` | Creates language model (alias) |
271
- | `provider.languageModel(modelId)` | Creates language model (ProviderV3 standard) |
272
- | `provider.embedding(modelId)` | Creates embedding model |
273
- | `provider.embeddingModel(modelId)` | Creates embedding model (ProviderV3 standard) |
274
-
275
- All methods accept an optional second parameter for model-specific settings.
268
+ | Method | Description |
269
+ | -------------------------------------- | --------------------------------------------- |
270
+ | `provider(modelId)` | Callable syntax, creates language model |
271
+ | `provider.chat(modelId)` | Creates language model (alias) |
272
+ | `provider.languageModel(modelId)` | Creates language model (ProviderV3 standard) |
273
+ | `provider.embedding(modelId)` | Creates embedding model (alias) |
274
+ | `provider.embeddingModel(modelId)` | Creates embedding model (ProviderV3 standard) |
275
+ | `provider.textEmbeddingModel(modelId)` | Creates embedding model (alias) |
276
+
277
+ > `embedding()` and `embeddingModel()` are identical. `textEmbeddingModel()` is
278
+ > deprecated in the V3 package — use `embeddingModel()` instead.
279
+ >
280
+ > **Note:** The V2 facade package (`@jerome-benoit/sap-ai-provider-v2`) only exposes
281
+ > `textEmbeddingModel()` for embeddings per the `ProviderV2` specification. Use the
282
+ > V3 package if you need `embedding()` or `embeddingModel()` aliases.
276
283
 
277
284
  ## Authentication
278
285
 
@@ -2,11 +2,11 @@ import {createRequire as __createRequire} from 'module';var require=__createRequ
2
2
  import {
3
3
  buildEmbeddingResult,
4
4
  prepareEmbeddingCall
5
- } from "./chunk-4CAVT2YC.js";
5
+ } from "./chunk-KS5QNMYZ.js";
6
6
  import {
7
7
  VERSION,
8
8
  convertToAISDKError
9
- } from "./chunk-O6ASHXPO.js";
9
+ } from "./chunk-DBAIFR3B.js";
10
10
 
11
11
  // src/base-embedding-model-strategy.ts
12
12
  var BaseEmbeddingModelStrategy = class {
@@ -51,4 +51,4 @@ var BaseEmbeddingModelStrategy = class {
51
51
  export {
52
52
  BaseEmbeddingModelStrategy
53
53
  };
54
- //# sourceMappingURL=chunk-BBWFNLML.js.map
54
+ //# sourceMappingURL=chunk-BV5Y6RMC.js.map