Package com.sap.ai.sdk.orchestration
Class OrchestrationModuleConfig
java.lang.Object
com.sap.ai.sdk.orchestration.OrchestrationModuleConfig
Represents the configuration for the orchestration service. Allows for configuring the different
modules of the orchestration service via a fluent API.
The orchestration pipeline combines different modules into a single execution flow where the output of one module serves as input for the next. The pipeline consists of the following modules:
- LLM Config (Mandatory)
- Templating (Optional)
- Data Masking (Optional)
- Input Content Filtering (Optional)
- Output Content Filtering (Optional)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanA content filter to filter the prompt.A grounding configuration to provide additional context to the AI model.Configuration for translating input content before processing.The configured language model settings.A masking configuration to pseudonymous or anonymize sensitive data in the input.Configuration for translating output content after processing.A template to be populated with input parameters.inthashCode()toString()withFilteringConfig(FilteringModuleConfig filteringConfig) A content filter to filter the prompt.withGrounding(GroundingProvider groundingProvider) Creates a new configuration with the given grounding configuration.withGroundingConfig(GroundingModuleConfig groundingConfig) A grounding configuration to provide additional context to the AI model.withInputFiltering(ContentFilter contentFilter, ContentFilter... contentFilters) Adds input content filters to the orchestration configuration.withInputTranslationConfig(SAPDocumentTranslationInput inputTranslationConfig) Configuration for translating input content before processing.withInputTranslationConfig(TranslationConfig.Input translationConfig) Configure input translation using a high-level TranslationConfig.withLlmConfig(LLMModelDetails llmConfig) The configured language model settings.withLlmConfig(OrchestrationAiModel aiModel) Creates a new configuration with the given LLM configuration.withMaskingConfig(MaskingProvider maskingProvider, MaskingProvider... maskingProviders) Creates a new configuration with the given Data Masking configuration.withMaskingConfig(MaskingModuleConfig maskingConfig) A masking configuration to pseudonymous or anonymize sensitive data in the input.withOutputFiltering(ContentFilter contentFilter, ContentFilter... contentFilters) Adds output content filters to the orchestration configuration.withOutputTranslationConfig(SAPDocumentTranslationOutput outputTranslationConfig) Configuration for translating output content after processing.withOutputTranslationConfig(TranslationConfig.Output translationConfig) Configure output translation using a high-level TranslationConfig.Creates a new configuration with the given stream configuration.withTemplateConfig(PromptTemplatingModuleConfigPrompt templateConfig) A template to be populated with input parameters.withTemplateConfig(TemplateConfig templateConfig) Creates a new configuration with the given template configuration asTemplateConfig.
-
Constructor Details
-
OrchestrationModuleConfig
public OrchestrationModuleConfig()
-
-
Method Details
-
withLlmConfig
Creates a new configuration with the given LLM configuration. -
withStreamConfig
@Nonnull public OrchestrationModuleConfig withStreamConfig(@Nonnull OrchestrationStreamConfig config) Creates a new configuration with the given stream configuration.- Parameters:
config- The stream configuration to use.- Returns:
- A new configuration with the given stream configuration.
- Since:
- 1.12.0
-
withMaskingConfig
@Nonnull public OrchestrationModuleConfig withMaskingConfig(@Nonnull MaskingProvider maskingProvider, @Nonnull MaskingProvider... maskingProviders) Creates a new configuration with the given Data Masking configuration. -
withInputFiltering
@Nonnull public OrchestrationModuleConfig withInputFiltering(@Nonnull ContentFilter contentFilter, @Nonnull ContentFilter... contentFilters) Adds input content filters to the orchestration configuration.Preferred over
withFilteringConfig(FilteringModuleConfig)for adding input filters. -
withOutputFiltering
@Nonnull public OrchestrationModuleConfig withOutputFiltering(@Nonnull ContentFilter contentFilter, @Nonnull ContentFilter... contentFilters) Adds output content filters to the orchestration configuration.Preferred over
withFilteringConfig(FilteringModuleConfig)for adding output filters. -
withGrounding
@Nonnull public OrchestrationModuleConfig withGrounding(@Nonnull GroundingProvider groundingProvider) Creates a new configuration with the given grounding configuration. -
withTemplateConfig
@Nonnull public OrchestrationModuleConfig withTemplateConfig(@Nonnull TemplateConfig templateConfig) Creates a new configuration with the given template configuration asTemplateConfig. -
withInputTranslationConfig
@Nonnull public OrchestrationModuleConfig withInputTranslationConfig(@Nonnull TranslationConfig.Input translationConfig) Configure input translation using a high-level TranslationConfig.- Parameters:
translationConfig- The translation configuration- Returns:
- A new OrchestrationModuleConfig with input translation configured
-
withOutputTranslationConfig
@Nonnull public OrchestrationModuleConfig withOutputTranslationConfig(@Nonnull TranslationConfig.Output translationConfig) Configure output translation using a high-level TranslationConfig.- Parameters:
translationConfig- The translation configuration- Returns:
- A new OrchestrationModuleConfig with output translation configured
-
getLlmConfig
The configured language model settings. This configuration is required when executing requests. -
getTemplateConfig
A template to be populated with input parameters. Upon request execution, this template will be enhanced with any messages and parameter values fromOrchestrationPrompt. -
getMaskingConfig
A masking configuration to pseudonymous or anonymize sensitive data in the input. -
getFilteringConfig
A content filter to filter the prompt. -
getGroundingConfig
A grounding configuration to provide additional context to the AI model. -
getInputTranslationConfig
Configuration for translating input content before processing. -
getOutputTranslationConfig
Configuration for translating output content after processing. -
equals
-
hashCode
public int hashCode() -
toString
-
withLlmConfig
The configured language model settings. This configuration is required when executing requests. -
withTemplateConfig
public OrchestrationModuleConfig withTemplateConfig(@Nullable PromptTemplatingModuleConfigPrompt templateConfig) A template to be populated with input parameters. Upon request execution, this template will be enhanced with any messages and parameter values fromOrchestrationPrompt. -
withMaskingConfig
A masking configuration to pseudonymous or anonymize sensitive data in the input. -
withFilteringConfig
public OrchestrationModuleConfig withFilteringConfig(@Nullable FilteringModuleConfig filteringConfig) A content filter to filter the prompt. -
withGroundingConfig
public OrchestrationModuleConfig withGroundingConfig(@Nullable GroundingModuleConfig groundingConfig) A grounding configuration to provide additional context to the AI model. -
withInputTranslationConfig
public OrchestrationModuleConfig withInputTranslationConfig(@Nullable SAPDocumentTranslationInput inputTranslationConfig) Configuration for translating input content before processing. -
withOutputTranslationConfig
public OrchestrationModuleConfig withOutputTranslationConfig(@Nullable SAPDocumentTranslationOutput outputTranslationConfig) Configuration for translating output content after processing.
-