Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while consuming AICore SDK for deployment and embedding generation #319

Open
shanathshetty opened this issue Feb 3, 2025 · 1 comment
Labels
question Further information is requested

Comments

@shanathshetty
Copy link

Ask the Question

Issue Description

We are migrating to SDK from AI Client for one of our existing GenAI feature and facing the issue w.r.t deployment creation and embedding generation Endpoint via service instance binding.(similar issue when tried via destination also). Followed all the steps as per documentation.
Would like to verify if its a bug from SDK.

We follow multi-tenancy and we have custom ResourceGroup, configs and deployments for each tenant.

POM & Service Env Variable
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/pom.xml#L145
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/logs/EnvoirmentofBoundService.txt

Issue with deployment creation.

Implementation .
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/src/main/java/com/sap/c4p/rm/skill/aicore/service/AIClient.java#L600

Error
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/logs/logDeploymentCreation.png

cloud log.
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/logs/skill-srv%20ceateDeployment.txt

Issue with Embedding generation.

Implementation.
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/src/main/java/com/sap/c4p/rm/skill/aicore/service/AIClient.java#L248

Error
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/logs/logEmbCreation.png

cloud log
https://github.tools.sap/Cloud4RM/Skill/blob/dev/aiSDK/srv/logs/skill-srv%20createEmbeddings.txt

Impact
Blocked development

Both Destination instance and AICore service instance are bound to the service, please feel free if any further input required.

@shanathshetty shanathshetty added the question Further information is requested label Feb 3, 2025
@newtork
Copy link
Contributor

newtork commented Feb 4, 2025

Unfortunately you didn't track the exception message (and potential suppressed exceptions). It's difficult to tell what exactly went wrong.

However I can tell the following:
The internal SAP Cloud SDK...

  • successfully finds at least one service binding for aicore.
  • fails to translate it to a Destination like object.

From the service bindings, it looks like your first bound instance results in an incorrect service binding payload.
Specifically if certificate-based authentication is assumed, then internal SAP Cloud SDK would expect "credential-type": "x509". Without, it's failing to interpret the first aicore service binding, resulting in an exception.


Therefore my suggestion would be to either remove the first service biding with the certificate, or provide full exception details, e.g. by catching and logging/printing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants