Skip to content

Commit 4a88687

Browse files
committed
Update prompt-registry based on main
1 parent 9a44f08 commit 4a88687

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionRequest.java

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected PromptTemplateSubstitutionRequest() {}
4545
* @return The same instance of this {@link PromptTemplateSubstitutionRequest} class
4646
*/
4747
@Nonnull
48-
public PromptTemplateSubstitutionRequest inputParams(@Nullable final Object inputParams) {
48+
public PromptTemplateSubstitutionRequest inputParams(@Nonnull final Object inputParams) {
4949
this.inputParams = inputParams;
5050
return this;
5151
}
@@ -65,7 +65,7 @@ public Object getInputParams() {
6565
*
6666
* @param inputParams The inputParams of this {@link PromptTemplateSubstitutionRequest}
6767
*/
68-
public void setInputParams(@Nullable final Object inputParams) {
68+
public void setInputParams(@Nonnull final Object inputParams) {
6969
this.inputParams = inputParams;
7070
}
7171

@@ -170,8 +170,22 @@ private String toIndentedString(final java.lang.Object o) {
170170
return o.toString().replace("\n", "\n ");
171171
}
172172

173-
/** Create a new {@link PromptTemplateSubstitutionRequest} instance. No arguments are required. */
174-
public static PromptTemplateSubstitutionRequest create() {
175-
return new PromptTemplateSubstitutionRequest();
173+
/**
174+
* Create a type-safe, fluent-api builder object to construct a new {@link
175+
* PromptTemplateSubstitutionRequest} instance with all required arguments.
176+
*/
177+
public static Builder create() {
178+
return (inputParams) -> new PromptTemplateSubstitutionRequest().inputParams(inputParams);
179+
}
180+
181+
/** Builder helper class. */
182+
public interface Builder {
183+
/**
184+
* Set the inputParams of this {@link PromptTemplateSubstitutionRequest} instance.
185+
*
186+
* @param inputParams The inputParams of this {@link PromptTemplateSubstitutionRequest}
187+
* @return The PromptTemplateSubstitutionRequest instance.
188+
*/
189+
PromptTemplateSubstitutionRequest inputParams(@Nonnull final Object inputParams);
176190
}
177191
}

core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ components:
867867
$ref: '#/components/schemas/PromptTemplateSpec'
868868
PromptTemplateSubstitutionRequest:
869869
type: object
870+
required:
871+
- inputParams
870872
properties:
871873
inputParams:
872874
type: object

0 commit comments

Comments
 (0)