-
Notifications
You must be signed in to change notification settings - Fork 8
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
Access via Destination #209
Comments
Hey, yes this is a use case we have in mind and have documented in the readme. However, that example is for using the |
Ok thanks. When will the ai-sdk-java be GA? |
Version 1.0.0 is available now: https://central.sonatype.com/artifact/com.sap.ai.sdk/core/versions To use a destination from destination service, you can use: var destination = DestinationAccessor.getDestination("myDestination").asHttp();
var service = new AiCoreService().withBaseDestination(destination);
var openAiDestination = service.getInferenceDestination().forModel(OpenAiModel.TEXT_EMBEDDING_3_LARGE);
var client = OpenAiClient.withCustomDestination(openAiDestination); Please run this code each time you want to use the client, because the destination will expire when the attached token expires. This is only needed when you use a destination from BTP destination service. |
Hi @MatKuhr ,
|
That is only a suppressed exception and not necessarily the root cause. I guess you may have not bound the BTP destination service to your application |
Hi @MatKuhr ,
I need to use Oauth2 credentials. But I don't see any Authorization header in the request which is made to the model. Not sure if the property name that I set is correct.
|
Using |
Ask the Question
Hello Team,
Our models and the application consuming the model runs in different accounts. I have created the destination where the application is hosted and have added Oauth2 credentials.
Do you have any documentation on how to use the SDK to call the emdebbing model (using destination) and get the embeddings and store it in Hana vector DB?
The text was updated successfully, but these errors were encountered: