SAP AI Core
The AI Core module provides a Python client for SAP AI Core, enabling you to manage AI scenarios, deployments, and executions from your application. The SDK handles credential resolution and authentication automatically via the service binding.
Basic Setup
Use set_aicore_config() to automatically load and configure AI Core credentials:
from sap_cloud_sdk.aicore import set_aicore_config
# Load credentials and configure environment for AI Core
set_aicore_config()
# Now use LiteLLM with AI Core
from litellm import completion
response = completion(
model="sap/gpt-4", messages=[{"role": "user", "content": "Hello!"}]
)
For the complete API reference and more examples, see the AI Core user guide in the cloud-sdk-python repository.