Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class OrchestrationConfig
// CHECKSTYLE:ON
{
@JsonProperty("modules")
private ModuleConfigs modules;
private OrchestrationConfigModules modules;

@JsonProperty("stream")
private GlobalStreamOptions stream;
Expand All @@ -47,7 +47,7 @@ protected OrchestrationConfig() {}
* @return The same instance of this {@link OrchestrationConfig} class
*/
@Nonnull
public OrchestrationConfig modules(@Nonnull final ModuleConfigs modules) {
public OrchestrationConfig modules(@Nonnull final OrchestrationConfigModules modules) {
this.modules = modules;
return this;
}
Expand All @@ -58,7 +58,7 @@ public OrchestrationConfig modules(@Nonnull final ModuleConfigs modules) {
* @return modules The modules of this {@link OrchestrationConfig} instance.
*/
@Nonnull
public ModuleConfigs getModules() {
public OrchestrationConfigModules getModules() {
return modules;
}

Expand All @@ -67,7 +67,7 @@ public ModuleConfigs getModules() {
*
* @param modules The modules of this {@link OrchestrationConfig}
*/
public void setModules(@Nonnull final ModuleConfigs modules) {
public void setModules(@Nonnull final OrchestrationConfigModules modules) {
this.modules = modules;
}

Expand Down Expand Up @@ -217,6 +217,6 @@ public interface Builder {
* @param modules The modules of this {@link OrchestrationConfig}
* @return The OrchestrationConfig instance.
*/
OrchestrationConfig modules(@Nonnull final ModuleConfigs modules);
OrchestrationConfig modules(@Nonnull final OrchestrationConfigModules modules);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Prompt Registry API
* Prompt Storage service for Design time & Runtime prompt templates.
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.sap.ai.sdk.prompt.registry.model;

import java.util.List;
import javax.annotation.Nonnull;

/** OrchestrationConfigModules */
public interface OrchestrationConfigModules {
/**
* Helper class to create {@code ModuleConfigs } that implements {@link
* OrchestrationConfigModules}.
*/
record InnerModuleConfigs(
@com.fasterxml.jackson.annotation.JsonValue @Nonnull ModuleConfigs value)
implements OrchestrationConfigModules {}

/**
* Creator to enable deserialization of {@code ModuleConfigs }.
*
* @param val the value to use
* @return a new instance of {@link InnerModuleConfigs}.
*/
@com.fasterxml.jackson.annotation.JsonCreator
@Nonnull
static InnerModuleConfigs createInnerModuleConfigs(@Nonnull final ModuleConfigs val) {
return new InnerModuleConfigs(val);
}

/**
* Helper class to create {@code List<ModuleConfigs> } that implements {@link
* OrchestrationConfigModules}.
*/
record ListOfModuleConfigss(
@com.fasterxml.jackson.annotation.JsonValue @Nonnull List<ModuleConfigs> values)
implements OrchestrationConfigModules {}

/**
* Creator to enable deserialization of {@code List<ModuleConfigs> }.
*
* @param val the value to use
* @return a new instance of {@link ListOfModuleConfigss}.
*/
@com.fasterxml.jackson.annotation.JsonCreator
@Nonnull
static ListOfModuleConfigss createListOfModuleConfigss(@Nonnull final List<ModuleConfigs> val) {
return new ListOfModuleConfigss(val);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected PromptTemplateSubstitutionRequest() {}
* @return The same instance of this {@link PromptTemplateSubstitutionRequest} class
*/
@Nonnull
public PromptTemplateSubstitutionRequest inputParams(@Nullable final Object inputParams) {
public PromptTemplateSubstitutionRequest inputParams(@Nonnull final Object inputParams) {
this.inputParams = inputParams;
return this;
}
Expand All @@ -65,7 +65,7 @@ public Object getInputParams() {
*
* @param inputParams The inputParams of this {@link PromptTemplateSubstitutionRequest}
*/
public void setInputParams(@Nullable final Object inputParams) {
public void setInputParams(@Nonnull final Object inputParams) {
this.inputParams = inputParams;
}

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

/** Create a new {@link PromptTemplateSubstitutionRequest} instance. No arguments are required. */
public static PromptTemplateSubstitutionRequest create() {
return new PromptTemplateSubstitutionRequest();
/**
* Create a type-safe, fluent-api builder object to construct a new {@link
* PromptTemplateSubstitutionRequest} instance with all required arguments.
*/
public static Builder create() {
return (inputParams) -> new PromptTemplateSubstitutionRequest().inputParams(inputParams);
}

/** Builder helper class. */
public interface Builder {
/**
* Set the inputParams of this {@link PromptTemplateSubstitutionRequest} instance.
*
* @param inputParams The inputParams of this {@link PromptTemplateSubstitutionRequest}
* @return The PromptTemplateSubstitutionRequest instance.
*/
PromptTemplateSubstitutionRequest inputParams(@Nonnull final Object inputParams);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,8 @@ components:
$ref: '#/components/schemas/PromptTemplateSpec'
PromptTemplateSubstitutionRequest:
type: object
required:
- inputParams
properties:
inputParams:
type: object
Expand Down Expand Up @@ -1283,7 +1285,7 @@ components:
description: Additional parameters for the model. Default values are used for mandatory parameters.
additionalProperties: true
example:
max_tokens: 300
max_completion_tokens: 300
temperature: 0.1
frequency_penalty: 0
presence_penalty: 0
Expand Down Expand Up @@ -1942,6 +1944,13 @@ components:
$ref: '#/components/schemas/GroundingModuleConfig'
translation:
$ref: '#/components/schemas/TranslationModuleConfig'
ModuleConfigsList:
type: array
items:
$ref: '#/components/schemas/ModuleConfigs'
minItems: 1
description: |
A list of module configurations. The first configuration in the list that succeeds will be used.
GlobalStreamOptions:
description: Options for streaming. Will be ignored if enabled is false.
type: object
Expand Down Expand Up @@ -1976,7 +1985,9 @@ components:
additionalProperties: false
properties:
modules:
$ref: '#/components/schemas/ModuleConfigs'
oneOf:
- $ref: '#/components/schemas/ModuleConfigs'
- $ref: '#/components/schemas/ModuleConfigsList'
stream:
$ref: '#/components/schemas/GlobalStreamOptions'
responses:
Expand Down