-
Notifications
You must be signed in to change notification settings - Fork 15
feat: [Orchestration] Support for Orchestration config persistence #697
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
# Conflicts: # docs/release_notes.md
orchestration/src/main/java/com/sap/ai/sdk/orchestration/ConfigToRequestTransformer.java
Show resolved
Hide resolved
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
Show resolved
Hide resolved
| @Value | ||
| @AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
| @Beta | ||
| public class OrchestrationConfigReference { |
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 decided against making this a sealed interface plus two permitted classes because I felt that would be a bit of an overkill for such little logic. Would be interested in your thoughts about that.
| * | ||
| * @since 1.14.0 | ||
| */ | ||
| public class OrchestrationConfigClient extends OrchestrationConfigsApi { |
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/Discussion)
I don't think we want to extend a custom class from generated code. Did we do that before? Is there no other way to apply mixins? Otherwise this has a code smell; we're introducing hand-written public API code for the sake of a workaround.
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.
We did that in PromptClient and GroundingClient. It's only to add mix-ins.
| */ | ||
| @Nonnull | ||
| public static Builder fromScenario(@Nonnull final String scenario) { | ||
| return new Builder(scenario); |
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)
You could've turned this into a currying builder, when the classes were interfaces.
return (name) -> (version) -> new OrchestrationConfigReference(null, scenario, name, version);
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationConfigReference.java
Show resolved
Hide resolved
CharlesDuboisSAP
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.
Looking good 😎
Context
The PR enables the management of Orchestration Configs in prompt registry (create, delete, list via generated code and new client) as well as convenience to use these Orchestration Configs in the
OrchestrationClient.Sample of new convenience:
Feature scope:
OchestrationConfigClientin prompt registryOrchestrationClientDefinition of Done
Aligned changes with the JavaScript SDK