You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sap-ai-core/consume-generic-secrets-in-executions-or-deployments-185a324.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,43 +2,43 @@
2
2
3
3
# Consume Generic Secrets in Executions or Deployments
4
4
5
-
Generic secrets at resource-group level can be attached to containers in executions or deployments. They can either be mounted as a volume or attached as an environment variable. The following examples illustrate how to consume a generic secret in a container by declaring it in the template. Note that only generic secrets can be attached to containers in this way. System secrets cannot be consumed in a template.
5
+
Generic secrets at resource-group level can be attached to containers in executions or deployments. They can either be mounted as a volume or attached as an environment variable. The following examples illustrate how to consume a generic secret in a container by declaring it in the template. Note that only generic secrets can be attached to containers in this way. System secrets can't be consumed in a template.
## Consume a Generic Secret as an Environment Variable
12
12
13
-
Generic secrets can be attached to containers using either `envFrom.secretRef` or `env.valueFrom.secretKeyRef`, as shown below.
13
+
Generic secrets can be attached to containers using either `envFrom.secretRef` or `env.valueFrom.secretKeyRef`:
14
14
15
15
- Using `envFrom.secretRef`:
16
16
17
17
```
18
18
spec:
19
-
containers:
20
-
- name: my-kserve-container
21
-
image: centaur
22
-
envFrom:
23
-
- secretRef:
24
-
name: MY_GENERIC_SECRET
19
+
containers:
20
+
- name: my-kserve-container
21
+
image: centaur
22
+
envFrom:
23
+
- secretRef:
24
+
name: MY_GENERIC_SECRET
25
25
```
26
26
27
-
If your secret contains invalid characters, such as hyphens \(-\), this method will result in error. You will need to map your secret to a valid variable name using `env.valueFrom.secretKeyRef`.
27
+
If your secret contains invalid characters, such as hyphens \(-\), this method results in error. In this case, map your secret to a valid variable name using `env.valueFrom.secretKeyRef`.
28
28
29
29
- Using `env.valueFrom.secretKeyRef`:
30
30
31
31
```
32
32
spec:
33
-
containers:
34
-
- name: kserve-container
35
-
image: centaur
36
-
env:
37
-
- name: MY_GENERIC_SECRET
38
-
valueFrom:
39
-
secretKeyRef:
40
-
name: my-generic-secret
41
-
key: some-credential
33
+
containers:
34
+
- name: kserve-container
35
+
image: centaur
36
+
env:
37
+
- name: MY_GENERIC_SECRET
38
+
valueFrom:
39
+
secretKeyRef:
40
+
name: my-generic-secret
41
+
key: some-credential
42
42
```
43
43
44
44
@@ -48,21 +48,21 @@ Generic secrets can be attached to containers using either `envFrom.secretRef` o
48
48
49
49
## Consume a Generic Secret as a Volume Mount
50
50
51
-
Generic secrets can also be mounted to containers as volumes, as shown below.
51
+
Generic secrets can also be mounted to containers as volumes:
52
52
53
53
```
54
54
spec:
55
-
containers:
56
-
- name: kserve-container
57
-
image: centaur
58
-
volumeMounts:
59
-
- name: my-generic-secret
60
-
mountPath: "/etc/my-generic-secret"
61
-
readOnly: true
62
-
volumes:
63
-
- name: my-generic-secret
64
-
secret:
65
-
secretName: my-generic-secret
55
+
containers:
56
+
- name: kserve-container
57
+
image: centaur
58
+
volumeMounts:
59
+
- name: my-generic-secret
60
+
mountPath: "/etc/my-generic-secret"
61
+
readOnly: true
62
+
volumes:
63
+
- name: my-generic-secret
64
+
secret:
65
+
secretName: my-generic-secret
66
66
```
67
67
68
68
@@ -71,11 +71,11 @@ spec:
71
71
72
72
## Additional Information
73
73
74
-
Secret names can be included as parameters in the templates and supplied via AI API configurations, as shown below.
74
+
Secret names can be included as parameters in the templates and supplied via AI API configurations:
Copy file name to clipboardExpand all lines: docs/sap-ai-core/create-a-prompt-template-declarative-815def5.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ The following formats are supported:
64
64
- The `additional_fields` field is unstructured and can be used to store metadata or configuration objects.
65
65
66
66
67
-
Your template syncs automatically. After a few minutes, you'll be able to verify your template by sending a GET request to the endpoint `{{apiurl}}/lm/promptTemplates`.
67
+
Your template syncs automatically. After a few minutes, you'll be able to verify your template by sending a GET request to the endpoint `{{apiurl}}/v2/lm/promptTemplates`.
Copy file name to clipboardExpand all lines: docs/sap-ai-core/create-a-prompt-template-imperative-92453a7.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,19 +7,19 @@
7
7
## Context
8
8
9
9
> ### Recommendation:
10
-
> The imperative API supports full CRUD operations and is recommended for refining prompt templates in designtime use cases. Iterations are tracked and can be viewed in the history endpoint.
10
+
> The imperative API supports full CRUD operations and is recommended for refining prompt templates in design-time use cases. Iterations are tracked and can be viewed in the history endpoint.
11
11
12
12
You can create a reusable prompt for a specific use case, including placeholders that are filled later.
13
13
14
14
15
15
16
16
## Procedure
17
17
18
-
Create a prompt template by sending a POST request to endpoint <code><code>{{apiurl}}/lm/promptTemplates</code></code>.
18
+
Create a prompt template by sending a POST request to endpoint <code><code>{{apiurl}}/v2/lm/promptTemplates</code></code>.
19
19
20
20
> ### Sample Code:
21
21
> ```
22
-
> curl -X POST "{{apiurl}}/lm/promptTemplates"\
22
+
> curl -X POST "{{apiurl}}/v2/lm/promptTemplates"\
23
23
> --header 'Content-Type: application/json' \
24
24
> --header "Authorization: Bearer $TOKEN" \
25
25
> --data '{
@@ -72,12 +72,12 @@ Create a prompt template by sending a POST request to endpoint <code><code>{{api
72
72
73
73
## Next Steps
74
74
75
-
You can iterate over the prompt template, and make changes to it.
75
+
You can iterate over the prompt template and make changes to it.
76
76
77
77
You can save your changes as a new version. The latest iteration is always the head version and is marked with `isVersionHead: true`.
78
78
79
79
> ### Tip:
80
-
> You'll need to update the version number when you want to create a new version, and the version entry must be semver compliant.
80
+
> You'll need to update the version number when you want to create a new version, and the version entry must be compliant with semantic versioning \(SemVer\).
81
81
82
82
You can check the change history for the template. For more information, see [Get Prompt Template History](get-prompt-template-history-dc204cf.md).
Copy file name to clipboardExpand all lines: docs/sap-ai-core/delete-a-prompt-template-f7566e3.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Delete a specific version of the prompt template, for imperatively managed promp
27
27
28
28
## Procedure
29
29
30
-
Send a DELETE request to the endpoint `{{apiurl}}/lm/promptTemplates/{{promptTemplateId}}` and include the template ID of the prompt you want to delete.
30
+
Send a DELETE request to the endpoint `{{apiurl}}/v2/lm/promptTemplates/{{promptTemplateId}}` and include the template ID of the prompt you want to delete.
Copy file name to clipboardExpand all lines: docs/sap-ai-core/deploy-models-dd16e8e.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,15 +145,15 @@
145
145
146
146
147
147
148
-
<a name="concept_z3s_f3h_vcc__d93e1165"/>
148
+
<a name="concept_z3s_f3h_vcc__d94e1165"/>
149
149
150
150
## Optional Parameters
151
151
152
152
The duration of a deployment can be limited using the `ttl` parameter. It takes an integer for quantity, and a single letter to specify units of time. Only minutes \(`m`\), hours \(`h`\) and days \(`d`\), are supported, and values must be natural numbers. For example, `"ttl": "5h"` gives the deployment a duration of 5 hours. `4.5h` and `4h30m` are not valid inputs. If no value is passed, the duration of the deployment if indefinite. Once the duration expires, the deployment is stopped and deleted.
Copy file name to clipboardExpand all lines: docs/sap-ai-core/export-a-prompt-template-3acef9b.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@ You can export a prompt template as a single file export in declarative compatib
21
21
22
22
## Procedure
23
23
24
-
Send a GET request to the endpoint `{{apiurl}}/lm/promptTemplates/{{promptTemplateId}}/export`, and include the name of your file in the `output` parameter.
24
+
Send a GET request to the endpoint `{{apiurl}}/v2/lm/promptTemplates/{{promptTemplateId}}/export`, and include the name of your file in the `output` parameter.
25
25
26
26
> ### Sample Code:
27
27
> ```
28
-
> curl -X GET "{{apiurl}}/lm/promptTemplates/{{promptTemplateId}}/export" \
28
+
> curl -X GET "{{apiurl}}/v2/lm/promptTemplates/{{promptTemplateId}}/export" \
Copy file name to clipboardExpand all lines: docs/sap-ai-core/get-prompt-template-history-dc204cf.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ You can list the history of edits to prompt templates, for imperatively managed
12
12
13
13
## Procedure
14
14
15
-
Send a GET request to endpoint `{{apiurl}}/lm/scenarios/{{scenarioId}}/promptTemplates/{{promptTemplateName}}/versions/{{versionId}}/history` and include the name, scenario, and version of your prompt template.
15
+
Send a GET request to endpoint `{{apiurl}}/v2/lm/scenarios/{{scenarioId}}/promptTemplates/{{promptTemplateName}}/versions/{{versionId}}/history` and include the name, scenario, and version of your prompt template.
16
16
17
17
> ### Sample Code:
18
18
> ```
19
-
> curl -X GET "{{apiurl}}/lm/scenarios/{{scenarioId}}/promptTemplates/{{promptTemplateName}}/versions/{{versionId}}/history" \
19
+
> curl -X GET "{{apiurl}}/v2/lm/scenarios/{{scenarioId}}/promptTemplates/{{promptTemplateName}}/versions/{{versionId}}/history" \
0 commit comments