-
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
E2E Different Resource Group #222
Conversation
- fix type - Add tests (1 fail)
…-resource-group # Conflicts: # sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/DeploymentController.java # sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/OpenAiTest.java
- fix bug on resource group with custom destinaiton on openai - update tests
verify(exactly(1), postRequestedFor(anyUrl()).withoutQueryParam("api-version")); | ||
verify( | ||
exactly(1), | ||
postRequestedFor(anyUrl()).withQueryParam("api-version", equalTo("2024-02-01"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Explanation)
Without the api-version
we experienced resource not found error messages from AI Core.
It is a little surprising that before we verified explicitly this header would be missing (?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, this was intended. The idea being that it is possible for users to prevent the api version from being set, e.g. for cases where the some model works without api version, or maybe it might be set automatically by long access; or if the key of that header ever changes.
That is why the javadoc of the method explicitly states to call withApiVersion afterwards
But to be fair, the above are rather hypothetical scenarios and i think it may be worthwhile to change it in favor of the more convenient approach of setting this automatically
<dependency> | ||
<groupId>com.sap.cloud.sdk.cloudplatform</groupId> | ||
<artifactId>cloudplatform-connectivity</artifactId> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Major)
Wait, why is this necessary?
Because of this code, it seems to infer HttpDestination
implicitly at compilation time.
final var destination =
new AiCoreService().getInferenceDestination(resourceGroup).forModel(GPT_4O);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the declaration, the maven dependency plugin with goal "analyze-only" reports "Used undeclared dependencies found"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a small section in the docs for this would be useful, otherwise Lgtm
Context
AI/ai-sdk-java-backlog#123.
Include test to cover using OpenAI or Orchestration service with a different
resourceGroup
than"default"
.Feature scope:
Definition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated