Java SDK Overview
Quick Start
For a quick start, check out the getting started section.
Why the SAP Cloud SDK for AI (SAP AI SDK)?
The SAP Cloud SDK for AI (SAP AI SDK) enables developers to seamlessly integrate AI capabilities, such as chat completion, into their Java-based business applications using SAP Generative AI Hub. Leverage powerful features like templating, grounding, data masking, and content filtering to build intelligent applications. The SAP AI SDK simplifies the setup and interaction with SAP AI Core, allowing you to focus on delivering value through AI integration.
Feature Matrix
Below you can find an overview of the currently available features and documentation.
Legend: ✅ - Generally Available, ❌ - Not Available, 🔧 - WIP/Limited Support, ➖- Not Applicable
Feature | Orchestration | Orchestration with Spring AI | OpenAI | OpenAI with Spring AI |
---|---|---|---|---|
Chat Completion | ✅ : docs | ✅ : docs | ✅ : docs | ➖ |
Templates | ✅ : docs | ❌ | ❌ | ➖ |
Content Moderation (Filtering): Azure | ✅ : docs | ✅ : docs | ➖ | ➖ |
Masking: DPI | ✅ : docs | ✅ : docs | ➖ | ➖ |
Grounding: Vector DB | ✅ : docs | ❌ | ❌ | ➖ |
Grounding: help.sap.com | ✅ : docs | ❌ | ➖ | ➖ |
Chat Memory / Message History | ✅ : docs | ✅ : docs | ✅ : docs | ➖ |
Stream Chat Completion | ✅ : docs | ✅ : docs | ✅ : docs | ➖ |
Multi-modal Messages | ✅ : docs | ❌ | ❌ | ➖ |
Response Format | ✅ : docs | ✅ : docs | ❌ | ➖ |
Translation Service | 🔧 | ❌ | ➖ | ➖ |
Chat Completion: Tool Call | 🔧 | ✅ : docs | ✅ : docs | ➖ |
Embedding | ❌ | ❌ | ✅ : docs | ✅ : docs |
General Requirements
To use the SAP AI SDK in a Java application, it is necessary to understand the technical prerequisites and required versions for common dependencies.
- Java 17 or higher.
- Access to an SAP AI Core Service instance.
Please refer to this documentation on how to connect the SAP AI SDK to AI Core.
The following table lists the required versions, based on the latest release:
Dependency | Minimum Version | Recommended Version |
---|---|---|
JDK | 17 (LTS) | 21 (LTS) |
SAP Cloud SDK | 5.6.0 | latest |
(optional) CAP Java | 3.0.0 | latest |
(optional) Spring Boot | 3.0 | latest |
(optional) Spring AI | 1.0.0 | latest |
See an example pom.xml
in our Spring Boot application.
Contribute, Support and Feedback
This project is open to feature requests/suggestions and bug reports via GitHub issues. Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our Contribution Guidelines.
Security / Disclosure
If you find any bug that may be a security problem, please follow our instructions at in our security policy on how to report it. Please do not create GitHub issues for security-related doubts or problems.
Code of Conduct
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its Code of Conduct at all times.
Licensing
Copyright 2024 SAP SE or an SAP affiliate company and ai-sdk-java contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.