@sap-ai-sdk/prompt-registry 1.11.1-20250414013204.0 → 1.11.1-20250415013200.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 +3 -53
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,12 +7,7 @@ This package incorporates generative AI prompt registry capabilities into your A
|
|
|
7
7
|
### Table of Contents
|
|
8
8
|
|
|
9
9
|
- [Installation](#installation)
|
|
10
|
-
- [
|
|
11
|
-
- [Usage](#usage)
|
|
12
|
-
- [List Prompt Templates](#list-prompt-templates)
|
|
13
|
-
- [Custom Destination](#custom-destination)
|
|
14
|
-
- [Error Handling](#error-handling)
|
|
15
|
-
- [Local Testing](#local-testing)
|
|
10
|
+
- [Documentation](#documentation)
|
|
16
11
|
- [Support, Feedback, Contribution](#support-feedback-contribution)
|
|
17
12
|
- [License](#license)
|
|
18
13
|
|
|
@@ -22,54 +17,9 @@ This package incorporates generative AI prompt registry capabilities into your A
|
|
|
22
17
|
$ npm install @sap-ai-sdk/prompt-registry
|
|
23
18
|
```
|
|
24
19
|
|
|
25
|
-
##
|
|
20
|
+
## Documentation
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
- Configure the project with **Node.js v20 or higher** and **native ESM** support.
|
|
29
|
-
|
|
30
|
-
> **Accessing the AI Core Service via the SDK**
|
|
31
|
-
>
|
|
32
|
-
> The SDK automatically retrieves the `AI Core` service credentials and resolves the access token needed for authentication.
|
|
33
|
-
>
|
|
34
|
-
> - In Cloud Foundry, it's accessed from the `VCAP_SERVICES` environment variable.
|
|
35
|
-
> - In Kubernetes / Kyma environments, you have to mount the service binding as a secret instead, for more information refer to [this documentation](https://www.npmjs.com/package/@sap/xsenv#usage-in-kubernetes).
|
|
36
|
-
|
|
37
|
-
## Usage
|
|
38
|
-
|
|
39
|
-
The example below demonstrate a sample usage of APIs in SAP AI Core prompt registry service.
|
|
40
|
-
|
|
41
|
-
In addition, you can find more **sample code** [here](https://github.com/SAP/ai-sdk-js/blob/main/sample-code/src/prompt-registry.ts).
|
|
42
|
-
|
|
43
|
-
### List Prompt Templates
|
|
44
|
-
|
|
45
|
-
```ts
|
|
46
|
-
const response: PromptTemplateListResponse =
|
|
47
|
-
await PromptTemplatesApi.listPromptTemplates({
|
|
48
|
-
scenario: 'test'
|
|
49
|
-
}).execute();
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Custom Destination
|
|
53
|
-
|
|
54
|
-
When calling the `execute()` method, it is possible to provide a custom destination.
|
|
55
|
-
For example, when querying deployments targeting a destination with the name `my-destination`, the following code can be used:
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
const response: PromptTemplateListResponse =
|
|
59
|
-
await PromptTemplatesApi.listPromptTemplates({
|
|
60
|
-
scenario: 'test'
|
|
61
|
-
}).execute({
|
|
62
|
-
destinationName: 'my-destination'
|
|
63
|
-
});
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Error Handling
|
|
67
|
-
|
|
68
|
-
For error handling instructions, refer to this [section](https://github.com/SAP/ai-sdk-js/blob/main/README.md#error-handling).
|
|
69
|
-
|
|
70
|
-
## Local Testing
|
|
71
|
-
|
|
72
|
-
For local testing instructions, refer to this [section](https://github.com/SAP/ai-sdk-js/blob/main/README.md#local-testing).
|
|
22
|
+
Visit the [SAP Cloud SDK for AI (JavaScript)](https://sap.github.io/ai-sdk/docs/js/overview-cloud-sdk-for-ai-js) documentation portal to learn more about its capabilities and detailed usage.
|
|
73
23
|
|
|
74
24
|
## Support, Feedback, Contribution
|
|
75
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ai-sdk/prompt-registry",
|
|
3
|
-
"version": "1.11.1-
|
|
3
|
+
"version": "1.11.1-20250415013200.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"internal.d.ts"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sap-ai-sdk/core": "^1.11.1-
|
|
23
|
+
"@sap-ai-sdk/core": "^1.11.1-20250415013200.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"compile": "tsc",
|