Skip to content

Commit 05f65f9

Browse files
committed
Update from SAP DITA CMS (squashed):
commit 8be4b12d29e60928a8ad840cf41b538a2a73d2a5 Author: REDACTED Date: Fri Jan 24 08:15:45 2025 +0000 Update from SAP DITA CMS 2025-01-24 08:15:45 Project: dita-all/bex1621329160251 Project map: d3e749bbac3d4f728c12228db6629c45.ditamap Output: loiodaa66b2ef49f48539fa2882d82d5b619 Language: en-US Builddable map: f17fa8568d0448c685f2a0301061a6ee.ditamap commit 4420fcda31012d57d4085b00a4c680e4fd494ccd Author: REDACTED Date: Fri Jan 24 08:10:17 2025 +0000 Update from SAP DITA CMS 2025-01-24 08:10:17 Project: dita-all/bex1621329160251 Project map: d3e749bbac3d4f728c12228db6629c45.ditamap Output: loiodaa66b2ef49f48539fa2882d82d5b619 Language: en-US Builddable map: f17fa8568d0448c685f2a0301061a6ee.ditamap commit ca01a7da9228420be672303c5cd89a781f7deb88 Author: REDACTED Date: Thu Jan 23 14:27:50 2025 +0000 Update from SAP DITA CMS 2025-01-23 14:27:50 Project: dita-all/bex1621329160251 Project map: d3e749bbac3d4f728c12228db6629c45.ditamap ################################################## [Remaining squash message was removed before commit...]
1 parent 83b22f4 commit 05f65f9

File tree

77 files changed

+2208
-687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2208
-687
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- loio4ca11f687fbd435b813b2726c3ddbaea -->
2+
3+
# Accessing Generative AI Models Through Global Scenarios
4+
5+
Access to generative AI models falls under the global AI scenarios `foundation-models` and `orchestration`. SAP AI Core manages these scenarios. You can access individual models as executables through serving templates. To use a specific model, choose the corresponding template.
6+
7+
- **[Orchestration](orchestration-cdd4847.md "The orchestration service operates under the global AI scenario
8+
orchestration, which is managed by SAP AI Core. This service
9+
enables the use of various generative AI models with a unified code, configuration, and
10+
deployment.")**
11+
The orchestration service operates under the global AI scenario `orchestration`, which is managed by SAP AI Core. This service enables the use of various generative AI models with a unified code, configuration, and deployment.
12+
- **[Foundation Models](foundation-models-2d981fb.md "The foundation models service operates under the global AI scenario
13+
foundation-models, which is managed by SAP AI Core.")**
14+
The foundation models service operates under the global AI scenario `foundation-models`, which is managed by SAP AI Core.
15+
16+
**Related Information**
17+
18+
19+
[Orchestration](orchestration-cdd4847.md "The orchestration service operates under the global AI scenario orchestration, which is managed by SAP AI Core. This service enables the use of various generative AI models with a unified code, configuration, and deployment.")
20+
21+
[Foundation Models](foundation-models-2d981fb.md "The foundation models service operates under the global AI scenario foundation-models, which is managed by SAP AI Core.")
22+

docs/sap-ai-core/chat-39321a9.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44

55
Orchestration can also be used in chat scenarios. The following example shows how to configure the templating module to use a chat prompt.
66

7+
8+
9+
<a name="loio39321a9f02c5486fafd76ec565cd9638__section_vr2_rpj_12c"/>
10+
11+
## Prerequisites
12+
13+
You have created a deployment for orchestration as described at [Create a Deployment for Orchestration](create-a-deployment-for-orchestration-4387aa7.md).
14+
15+
16+
17+
<a name="loio39321a9f02c5486fafd76ec565cd9638__section_chv_4qj_12c"/>
18+
19+
## Process
20+
721
```
822
curl --request POST $ORCH_DEPLOYMENT_URL/completion \
923
--header 'content-type: application/json' \
@@ -21,7 +35,7 @@ curl --request POST $ORCH_DEPLOYMENT_URL/completion \
2135
]
2236
},
2337
"llm_module_config": {
24-
"model_name": "gpt-35-turbo-16k",
38+
"model_name": "<ModelName>",
2539
"model_params": {
2640
"max_tokens": 300,
2741
"temperature": 0.1,
@@ -104,7 +118,7 @@ The response contains the messages from the chat history and the response to the
104118
"id": "chatcmpl-9kXqisJKnuNv1B4eXTUzqZEJSmzdC",
105119
"object": "chat.completion",
106120
"created": 1720880232,
107-
"model": "gpt-35-turbo-16k",
121+
"model": "<ModelName>",
108122
"choices": [
109123
{
110124
"index": 0,
@@ -126,7 +140,7 @@ The response contains the messages from the chat history and the response to the
126140
"id": "chatcmpl-9kXqisJKnuNv1B4eXTUzqZEJSmzdC",
127141
"object": "chat.completion",
128142
"created": 1720880232,
129-
"model": "gpt-35-turbo-16k",
143+
"model": "<ModelName>",
130144
"choices": [
131145
{
132146
"index": 0,
@@ -146,3 +160,10 @@ The response contains the messages from the chat history and the response to the
146160
}
147161
```
148162

163+
**Related Information**
164+
165+
166+
[Leveraging Orchestration Capabilities to Enhance Responses](https://developers.sap.com/tutorials/ai-core-orchestration-consumption-opt.html)
167+
168+
[Libraries and SDKs](libraries-and-sdks-499309d.md "Explore additional SDKs and Libraries, for use with SAP AI Core.")
169+

docs/sap-ai-core/consume-generative-ai-models-bf0373b.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The resource group used in the activation steps
7575

7676
## Example Payloads for Inferencing
7777

78-
llama2-70b-chat-hfThe following examples show how you can consume various generative AI models using curl. For more information about prompts, see the tutorial [Prompt LLMs in the Generative AI Hub in SAP AI Core & Launchpad](https://developers.sap.com/tutorials/ai-core-generative-ai.html).
78+
The following examples show how you can consume various generative AI models using curl. For more information about prompts, see the tutorial [Prompt LLMs in the Generative AI Hub in SAP AI Core & Launchpad](https://developers.sap.com/tutorials/ai-core-generative-ai.html).
7979

8080
> ### Tip:
8181
> If you use a Windows device, use Windows Powershell, and replace `curl` with `curl.exe`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<!-- loio2392d9a0504e4380bfa75a5efdb64b6e -->
2+
3+
# Consume Models with the Harmonized API
4+
5+
In this section, we will provide a minimal inference call without any orchestration modules.
6+
7+
A minimal call to orchestration contains only configurations of the required templating and model configuration modules. The curl command below shows how to make such a request.
8+
9+
```
10+
curl --request POST $ORCH_DEPLOYMENT_URL/completion \
11+
--header 'content-type: application/json' \
12+
--header "Authorization: Bearer $TOKEN" \
13+
--header "ai-resource-group: $RESOURCE_GROUP" \
14+
--data-raw '{
15+
"orchestration_config": {
16+
"module_configurations": {
17+
"templating_module_config": {
18+
"template": [
19+
{
20+
"role": "user",
21+
"content": "Reply with `{{?text}}` in {{?language}}"
22+
}
23+
],
24+
"defaults": {
25+
"language": "English"
26+
}
27+
},
28+
"llm_module_config": {
29+
"model_name": " gpt-35-turbo-16k ",
30+
"model_params": {
31+
"max_tokens": 50,
32+
"temperature": 0.1,
33+
"frequency_penalty": 0,
34+
"presence_penalty": 0
35+
},
36+
"model_version": "latest"
37+
}
38+
}
39+
},
40+
"input_params": {
41+
"text": "Orchestration is Working!",
42+
"language": "German"
43+
}
44+
}'
45+
```
46+
47+
This request configures the templating module with a single user message with two parameters: `text` and `language`. The `language` parameter is also configured with English as the default. The LLM module is configured to use gpt-35-turbo-16k in the latest available version and a set of model parameters. The `input_params` field contains the values for the parameters `text` and `language`. These values are used during this request in the prompt sent to the model.
48+
49+
The response contains a `request_id`, the module results from each module that was executed, and the `orchestration_result`, which includes the response of the call to the model.
50+
51+
> ### Output Code:
52+
> ```
53+
> {
54+
> "request_id": "53fc2dcd-399d-4a2b-8bde-912b9f001fed",
55+
> "module_results": {
56+
> "templating": [
57+
> {
58+
> "role": "user",
59+
> "content": "Reply with `Orchestration is Working!` in German"
60+
> }
61+
> ],
62+
> "llm": {
63+
> "id": "chatcmpl-9k8M3djXphXPWh2QkQm1YVtXK4Eki",
64+
> "object": "chat.completion",
65+
> "created": 1720782231,
66+
> "model": " gpt-35-turbo-16k ",
67+
> "choices": [
68+
> {
69+
> "index": 0,
70+
> "message": {
71+
> "role": "assistant",
72+
> "content": "Orchestrierungsdienst funktioniert!"
73+
> },
74+
> "finish_reason": "stop"
75+
> }
76+
> ],
77+
> "usage": {
78+
> "completion_tokens": 10,
79+
> "prompt_tokens": 20,
80+
> "total_tokens": 30
81+
> }
82+
> }
83+
> },
84+
> "orchestration_result": {
85+
> "id": "chatcmpl-9k8M3djXphXPWh2QkQm1YVtXK4Eki",
86+
> "object": "chat.completion",
87+
> "created": 1720782231,
88+
> "model": "<ModelName>",
89+
> "choices": [
90+
> {
91+
> "index": 0,
92+
> "message": {
93+
> "role": "assistant",
94+
> "content": "Orchestrierungsdienst funktioniert!"
95+
> },
96+
> "finish_reason": "stop"
97+
> }
98+
> ],
99+
> "usage": {
100+
> "completion_tokens": 10,
101+
> "prompt_tokens": 20,
102+
> "total_tokens": 30
103+
> }
104+
> }
105+
> }
106+
> ```
107+
108+
The templating module result contains the user message with the filled in parameters. The LLM module result contains the response of the model execution. In this example, the LLM module result and the orchestration result are the same. However, they might differ, such as when the output filtering module filters the response.
109+
110+
**Related Information**
111+
112+
113+
[Consumption of GenAI Models Using Orchestration – A Beginner's Guide](https://developers.sap.com/tutorials/ai-core-orchestration-consumption.html)
114+
115+
[Libraries and SDKs](libraries-and-sdks-499309d.md "Explore additional SDKs and Libraries, for use with SAP AI Core.")
116+

docs/sap-ai-core/content-filtering-on-input-04e7c5a.md

-83
This file was deleted.

docs/sap-ai-core/content-filtering-on-output-f0fba18.md

-74
This file was deleted.

docs/sap-ai-core/create-a-collection-9cbfe27.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
## Prerequisites
1010

11-
You have created a resource group for grounding purposes. For more information, see [Create a Resource Group for AI Data Management](create-a-resource-group-for-ai-data-management-6712bfe.md)
11+
You have created a resource group for grounding purposes. For more information, see [Create a Resource Group for Grounding](create-a-resource-group-for-grounding-6712bfe.md)
1212

13-
You have created a generic secret for grounding purposes. For more information, see [Create a Generic Secret for AI Data Management](create-a-generic-secret-for-ai-data-management-bdea357.md)
13+
You have created a generic secret for grounding purposes. For more information, see [Create a Generic Secret for Grounding](create-a-generic-secret-for-grounding-bdea357.md)
1414

1515

1616

docs/sap-ai-core/create-a-deployment-for-a-generative-ai-model-b32e7a8.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ You make a model available for use by creating a deployment. You can do so one t
8585
> "parameterBindings": [
8686
> {
8787
> "key":"modelName",
88-
> "value":"gpt-35-turbo"
88+
> "value":"<ModelName>"
8989
> },
9090
> {
9191
> "key": "modelVersion",
92-
> "value": "0613"
92+
> "value": "<ModelVersion>"
9393
> }
9494
> ],
9595
> "inputArtifactBindings": []

0 commit comments

Comments
 (0)