Important
Given the recommendation to utilize the generative AI hub (General Availability Q4/2023) for foundational model access, we kindly refer to btp-cap-genai-rag to understand the process of establishing a connection from CAP through the Generative AI Hub to Azure OpenAI
With AI Core as a proxy for Azure OpenAI Services, we are able to perform prompt engineering, e.g. to add more context in the form of (SAP) documents or to perform input validation. This sample implements parts of the Reference architecture of an SAP BTP CAP application using GPT Models of OpenAI and serves as a starting point for such a raw proxy and shows how SAP AI Core can be consumed and exposed via a CAP API.
In order to be able to carry out the steps for setup and deployment, an SAP BTP Subaccount is required, as well as the necessary entitlements. Provision the infrastructure and set the entitlements on SAP BTP by performing the steps of setup Global Account and Subaccount in order to deploy the respected components.
- SAP BTP Subaccount
- SAP AI Core instance
- SAP AI Launchpad subscription (recommended)
- SAP BTP, Cloud Foundry Runtime
- Destination Service
- SAP Authorization and Trust Management Service
- Azure OpenAI Service with Base URL (endpoint) and API Key
- Docker Hub account (optional)
This sample is divided into two sub-projects and implements parts of the Reference architecture of an SAP BTP CAP application using GPT Models of OpenAI as shown and mentioned in the overview. The first describes how a proxy can be created via AI Core to consume Azure OpenAI services and the second part shows how an AI Core inference service (the actual proxy) can be consumed via a CAP API and exposed via an endpoint.
- Getting started with AI at SAP: SAP AI Launchpad and SAP AI Core
- Setup Docker Hub account and build & push your Docker Image (optional)
- Register general artifacts on SAP AI Core and inspect in SAP AI Launchpad
- Deploy the Inference Service on SAP AI Core as Proxy for Azure OpenAI Services
- Test and play with deployed service
- Prepare for CAP API (Cloud Application Programming) deployment
- Deploy the CAP API
- Attach SAP AI Core to CAP via Destination
- Test CAP Endpoint
No known issues.
Create an issue in this repository if you find a bug or have questions about the content.
For additional support, ask a question in SAP Community.
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.
Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.