Package com.sap.ai.sdk.orchestration

# Class OrchestrationModuleConfig

java.lang.Object
com.sap.ai.sdk.orchestration.OrchestrationModuleConfig

public final class OrchestrationModuleConfig extends Object
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
  Constructor
  Description
  `OrchestrationModuleConfig()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `FilteringModuleConfig`
  `getFilteringConfig()`
  A content filter to filter the prompt.
  `GroundingModuleConfig`
  `getGroundingConfig()`
  A grounding configuration to provide additional context to the AI model.
  `SAPDocumentTranslationInput`
  `getInputTranslationConfig()`
  Configuration for translating input content before processing.
  `LLMModelDetails`
  `getLlmConfig()`
  The configured language model settings.
  `MaskingModuleConfig`
  `getMaskingConfig()`
  A masking configuration to pseudonymous or anonymize sensitive data in the input.
  `SAPDocumentTranslationOutput`
  `getOutputTranslationConfig()`
  Configuration for translating output content after processing.
  `PromptTemplatingModuleConfigPrompt`
  `getTemplateConfig()`
  A template to be populated with input parameters.
  `int`
  `hashCode()`
  `String`
  `toString()`
  `OrchestrationModuleConfig`
  `withFilteringConfig(FilteringModuleConfig filteringConfig)`
  A content filter to filter the prompt.
  `OrchestrationModuleConfig`
  `withGrounding(GroundingProvider groundingProvider)`
  Creates a new configuration with the given grounding configuration.
  `OrchestrationModuleConfig`
  `withGroundingConfig(GroundingModuleConfig groundingConfig)`
  A grounding configuration to provide additional context to the AI model.
  `OrchestrationModuleConfig`
  `withInputFiltering(ContentFilter contentFilter, ContentFilter... contentFilters)`
  Adds input content filters to the orchestration configuration.
  `OrchestrationModuleConfig`
  `withInputTranslationConfig(SAPDocumentTranslationInput inputTranslationConfig)`
  Configuration for translating input content before processing.
  `OrchestrationModuleConfig`
  `withInputTranslationConfig(TranslationConfig.Input translationConfig)`
  Configure input translation using a high-level TranslationConfig.
  `OrchestrationModuleConfig`
  `withLlmConfig(LLMModelDetails llmConfig)`
  The configured language model settings.
  `OrchestrationModuleConfig`
  `withLlmConfig(OrchestrationAiModel aiModel)`
  Creates a new configuration with the given LLM configuration.
  `OrchestrationModuleConfig`
  `withMaskingConfig(MaskingProvider maskingProvider, MaskingProvider... maskingProviders)`
  Creates a new configuration with the given Data Masking configuration.
  `OrchestrationModuleConfig`
  `withMaskingConfig(MaskingModuleConfig maskingConfig)`
  A masking configuration to pseudonymous or anonymize sensitive data in the input.
  `OrchestrationModuleConfig`
  `withOutputFiltering(ContentFilter contentFilter, ContentFilter... contentFilters)`
  Adds output content filters to the orchestration configuration.
  `OrchestrationModuleConfig`
  `withOutputTranslationConfig(SAPDocumentTranslationOutput outputTranslationConfig)`
  Configuration for translating output content after processing.
  `OrchestrationModuleConfig`
  `withOutputTranslationConfig(TranslationConfig.Output translationConfig)`
  Configure output translation using a high-level TranslationConfig.
  `OrchestrationModuleConfig`
  `withStreamConfig(OrchestrationStreamConfig config)`
  Creates a new configuration with the given stream configuration.
  `OrchestrationModuleConfig`
  `withTemplateConfig(PromptTemplatingModuleConfigPrompt templateConfig)`
  A template to be populated with input parameters.
  `OrchestrationModuleConfig`
  `withTemplateConfig(TemplateConfig templateConfig)`
  Creates a new configuration with the given template configuration as `TemplateConfig`.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OrchestrationModuleConfig

    public OrchestrationModuleConfig()

- ## Method Details

  - ### withLlmConfig

    @Nonnull public OrchestrationModuleConfig withLlmConfig(@Nonnull OrchestrationAiModel aiModel)
    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 as `TemplateConfig`.

  - ### 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

    @Nullable public LLMModelDetails getLlmConfig()
    The configured language model settings. This configuration is required when executing requests.

  - ### getTemplateConfig

    @Nullable public PromptTemplatingModuleConfigPrompt getTemplateConfig()
    A template to be populated with input parameters. Upon request execution, this template will be enhanced with any messages and parameter values from `OrchestrationPrompt`.

  - ### getMaskingConfig

    @Nullable public MaskingModuleConfig getMaskingConfig()
    A masking configuration to pseudonymous or anonymize sensitive data in the input.

  - ### getFilteringConfig

    @Nullable public FilteringModuleConfig getFilteringConfig()
    A content filter to filter the prompt.

  - ### getGroundingConfig

    @Nullable public GroundingModuleConfig getGroundingConfig()
    A grounding configuration to provide additional context to the AI model.

  - ### getInputTranslationConfig

    @Nullable public SAPDocumentTranslationInput getInputTranslationConfig()
    Configuration for translating input content before processing.

  - ### getOutputTranslationConfig

    @Nullable public SAPDocumentTranslationOutput getOutputTranslationConfig()
    Configuration for translating output content after processing.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### withLlmConfig

    public OrchestrationModuleConfig withLlmConfig(@Nullable LLMModelDetails llmConfig)
    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 from `OrchestrationPrompt`.

  - ### withMaskingConfig

    public OrchestrationModuleConfig withMaskingConfig(@Nullable MaskingModuleConfig maskingConfig)
    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.