-
Notifications
You must be signed in to change notification settings - Fork 16
feat: [DevOps] Poc RPT #732
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
base: main
Are you sure you want to change the base?
Conversation
PoC RPTImportant Mentions:
|
| import lombok.AccessLevel; | ||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.val; | ||
| import org.springframework.http.client.BufferingClientHttpRequestFactory; |
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.
(Question)
Can we use the new generator without spring dependencies?
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.
Yes. I am working on the related cloud sdk item to fix spring optionality first. Then, later make use of the same in the new module client
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.
I updated the PR by regenerating with <library>apache-httpclient</library> on the latest cloud sdk release (5.26.0). But this will include spring dependencies.
Once my latest PR on cloud sdk for new openapi-core-apache module is merged, the import statements will change and there will no dependency on spring. We should regenerate again after release of cloud sdk 5.27.0.
| * | ||
| * <p>A REST API for in-context learning with the SAP-RPT-1 model. | ||
| */ | ||
| public class DefaultApi extends AbstractOpenApiService { |
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.
I believe the spec is currently missing a tag, so the generated api class gets a default name DefaultApi.
Jonas-Isr
left a comment
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.
Mostly minor issues. Looks pretty good :)
| * | ||
| * <p>A REST API for in-context learning with the SAP-RPT-1 model. | ||
| */ | ||
| public class DefaultApi extends AbstractOpenApiService { |
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.
(Minor/Question)
This is a very non-descriptive class name (which does not come from the spec itself as far as I can see). Does it make sense to rename that when generating?
foundation-models/sap-rpt/src/main/java/com/sap/ai/sdk/foundationmodels/rpt/RptClient.java
Outdated
Show resolved
Hide resolved
foundation-models/sap-rpt/src/main/java/com/sap/ai/sdk/foundationmodels/rpt/RptModel.java
Outdated
Show resolved
Hide resolved
| <apiPackage>com.sap.ai.sdk.foundationmodels.rpt.generated.client</apiPackage> | ||
| <generateApis>true</generateApis> | ||
| <additionalProperties> | ||
| <library>apache-httpclient</library> |
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.
Try with and without pojoBuildMethodName
Add <pojoConstructorVisibility>protected</pojoConstructorVisibility>
Add <aiSdkConstructor>true</aiSdkConstructor>
Try with and without removeOperationIdPrefix
Try with and without fixResponseSchemaTitles
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.
I added <pojoConstructorVisibility>protected</pojoConstructorVisibility>
<pojoBuildMethodName>is not irrelevant since we have a curried builder.<aiSdkConstructor>true</aiSdkConstructor>is not relevant when you want a deployment's url for some particular model and not anAiCoreServiceinstance pointing atAI_API_URLfromAICORE_SERVICE_KEY<removeOperationIdPrefix>is relevant only when a very long"operationId"is specified in spec. Also not relevant for provided spec.<fixResponseSchemaTitles>is used when generator creates pojo classes likeInlineObject1,InlineObject2etc and loses ordering on regeneration. That is not the case here but maybe in future this becomes relevant.
Context
AI/ai-sdk-java-backlog#350.
PoC for supporting the latest SAP RPT (Tabular AI) service
Feature scope:
foundationmodelsmodulesap-rptintroducedRptClientandRptModelclassspec updateactionDefinition of Done
Aligned changes with the JavaScript SDK