Skip to content

Commit 4145295

Browse files
newtorka-dMatKuhrjjtang1985CharlesDuboisSAP
authored
[Blog] Introduction blog post (#154)
* Initial * Update Introducing.md * Update docs/blog/Introducing.md Co-authored-by: Matthias Kuhr <[email protected]> * Update docs/blog/Introducing.md Co-authored-by: Matthias Kuhr <[email protected]> * Update docs/blog/Introducing.md Co-authored-by: Junjie Tang <[email protected]> * Update docs/blog/Introducing.md Co-authored-by: Charles Dubois <[email protected]> * Update Introducing.md * Update Introducing.md * cross link typescript blog post * Update docs/blog/Introducing.md * Replace occurrences of (Maven) "artifact" with (Maven) "module" * Update docs/blog/Introducing.md * Follow up on suggestions * replace "here" * Restructuring chapters * Add limitation of foundation models * Update Introducing.md * Apply suggestions from code review Co-authored-by: Junjie Tang <[email protected]> --------- Co-authored-by: Alexander Dümont <[email protected]> Co-authored-by: Matthias Kuhr <[email protected]> Co-authored-by: Junjie Tang <[email protected]> Co-authored-by: Charles Dubois <[email protected]>
1 parent af0dd02 commit 4145295

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

docs/blog/Introducing.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Introducing the SAP Cloud SDK for AI (Java) 🎉
2+
3+
SAP Managed Tags: Artificial Intelligence, Java, SAP AI Core, SAP AI Launchpad, SAP Cloud SDK, SAP Business Technology Platform
4+
5+
---
6+
7+
We’re excited to announce the initial release of the [SAP Cloud SDK for AI for Java](https://github.com/SAP/ai-sdk-java#readme)!
8+
Only a few weeks ago we already [announced the release](https://community.sap.com/t5/technology-blogs-by-sap/introducing-the-sap-cloud-sdk-for-ai-javascript-typescript/ba-p/13892856) of the JavaScript/TypeScript variant.
9+
Similarly, this SDK for Java enables convenient integration of generative AI capabilities within your SAP Business Technology Platform (BTP) applications and allows you to utilize the [Generative AI Hub](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/generative-ai-hub-in-sap-ai-core) in [SAP AI Core](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/what-is-sap-ai-core).
10+
11+
For [SAP BTP](https://help.sap.com/docs/btp?locale=en-US) developers, the AI SDK is crafted to simplify AI integration and enhance application impact. With features that optimize deployment, improve content safety, and facilitate model orchestration, the SDK lets you bring advanced AI functionality to your applications swiftly and with minimal setup. Whether you need adaptable workflows, secure data handling, or smooth generative model integration, the SDK equips you with robust tools to embed AI-powered features in your SAP BTP solutions.
12+
13+
This post introduces the main modules and their features.
14+
15+
## AI Core - Setup and Usage
16+
17+
```xml
18+
<dependency>
19+
<groupId>com.sap.ai.sdk</groupId>
20+
<artifactId>core</artifactId>
21+
<version>1.0.0</version>
22+
</dependency>
23+
```
24+
25+
Automate tasks such as creating AI Core artifacts, configurations, and deployments, executing batch inference jobs, as well as managing Docker registries and object storage for training data.
26+
The `core` module provides tools for workflow and scenario management within SAP AI Core.
27+
* Artifact management: register and organize datasets and model artifacts.
28+
* Configuration management: set up configurations for various models and use cases.
29+
* Deployment management: deploy AI models and manage their lifecycle within SAP AI Core.
30+
31+
**Example SDK code:** Create a deployment in SAP AI Core.
32+
33+
```java
34+
var api = new DeploymentApi();
35+
var resourceGroupId = "default";
36+
var request =
37+
AiDeploymentCreationRequest.create().configurationId("12345-123-123-123-123456abcdefg");
38+
39+
AiDeploymentCreationResponse deployment = api.create(resourceGroupId, request);
40+
String id = deployment.getId();
41+
AiExecutionStatus status = deployment.getStatus();
42+
```
43+
44+
You can learn more about the SDK's capabilities for SAP AI Core [in the public repository guide](https://github.com/SAP/ai-sdk-java/blob/main/docs/guides/AI_CORE_DEPLOYMENT.md).
45+
46+
## AI Core - Orchestration
47+
48+
```xml
49+
<dependency>
50+
<groupId>com.sap.ai.sdk</groupId>
51+
<artifactId>orchestration</artifactId>
52+
<version>1.0.0</version>
53+
</dependency>
54+
```
55+
56+
This `orchestration` module lets you use the [Generative AI Hub Orchestration Service](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/orchestration) with templating, content filtering, and data masking from within your applications.
57+
The Orchestration Service streamlines AI interactions while ensuring adherence to content safety guidelines.
58+
59+
* Templating: Build dynamic prompts with placeholders to tailor AI interactions to user inputs.
60+
* Content Filtering: Apply filters to maintain compliance with content safety guidelines.
61+
* Data Masking: Anonymize and pseudonymize sensitive data.
62+
* Grounding: Add external data sources for contextually relevant information (planned for Q1 2025).
63+
64+
**Example SDK code:** Write a simple chat completion.
65+
66+
```java
67+
var client = new OrchestrationClient();
68+
var config = new OrchestrationModuleConfig().withLlmConfig(OrchestrationAiModel.GPT_4O);
69+
var prompt = new OrchestrationPrompt("Hello world! Why is this phrase so famous?");
70+
var result = client.chatCompletion(prompt, config);
71+
72+
String messageResult = result.getContent();
73+
```
74+
75+
You can learn more about the SDK's capabilities for Orchestration Service [in the public repository guide](https://github.com/SAP/ai-sdk-java/blob/main/docs/guides/ORCHESTRATION_CHAT_COMPLETION.md).
76+
77+
## AI Core - Foundation Models
78+
79+
```xml
80+
<dependency>
81+
<groupId>com.sap.ai.sdk.foundationmodels</groupId>
82+
<artifactId>openai</artifactId>
83+
<version>1.0.0</version>
84+
</dependency>
85+
```
86+
87+
The `openai` module, along with other modules in the `com.sap.ai.sdk.foundationmodels` group, enables streamlined access to specific generative AI models available through the Generative AI Hub.
88+
The module provides a simplified interface focused on direct model interactions, ideal for developers who require direct access to foundation models for inference and embedding requests without additional orchestration features.
89+
90+
Currently only `openai` is supported.
91+
Please open a [feature request](https://github.com/SAP/ai-sdk-java/issues/new/choose), if you need direct LLM access for other foundation models.
92+
93+
**Example SDK code:** Write a simple chat completion.
94+
95+
```java
96+
var result =
97+
OpenAiClient.forModel(GPT_35_TURBO)
98+
.withSystemPrompt("You are a helpful AI")
99+
.chatCompletion("Hello World! Why is this phrase so famous?");
100+
101+
String resultMessage = result.getContent();
102+
```
103+
104+
You can learn more about the SDK's capabilities for foundation models and OpenAI specific features [in the public repository guide](https://github.com/SAP/ai-sdk-java/blob/main/docs/guides/OPENAI_CHAT_COMPLETION.md).
105+
106+
## Getting Started
107+
108+
You will need _Java 17_ or higher.
109+
_Spring Boot_ or [_SAP Cloud Application Programming Model (CAP)_](https://cap.cloud.sap/docs/) as a framework is recommended, but not required.
110+
To explore these packages further, check out [our sample project](https://github.com/SAP/ai-sdk-java/tree/main/sample-code/spring-app), which shows the usage of the various SDK packages.
111+
112+
## Support and Feedback
113+
114+
We’d love your feedback on this first release! For support or to share your ideas, feel free to open an issue on [GitHub](https://github.com/SAP/ai-sdk-java/issues/new/choose).
115+
116+
## Latest News
117+
* [SAP Cloud SDK for AI for JavaScript](https://community.sap.com/t5/technology-blogs-by-sap/introducing-the-sap-cloud-sdk-for-ai-javascript-typescript/ba-p/13892856) released in October 2024.
118+
* Visit [sap.com/ai](https://www.sap.com/products/artificial-intelligence.html) and explore our portfolio
119+
* Explore the available AI capabilities on [SAP Discovery Center](https://discovery-center.cloud.sap/serviceCatalog/sap-ai-core/?region=all).
120+
* Discover the latest announcements in the [SAP TechEd Press Release](https://news.sap.com/?p=228310) and the [SAP TechEd News Guide](https://www.sap.com/events/teched/news-guide.html).
121+
* Review the [SAP Road Map Explorer](https://roadmaps.sap.com/board?PRODUCT=73554900100800003641&PRODUCT=73555000100800003283&range=FIRST-LAST) for a detailed view of upcoming product innovations.
122+
* Join the [SAP Community](https://pages.community.sap.com/topics/ai-core-artificial-intelligence) page to connect with experts and share knowledge.

0 commit comments

Comments
 (0)