Class TranslationConfig.Input

java.lang.Object
com.sap.ai.sdk.orchestration.TranslationConfig.Input
All Implemented Interfaces:
TranslationConfig
Enclosing interface:
TranslationConfig

public static final class TranslationConfig.Input extends Object implements TranslationConfig
Input configuration for translation.
  • Method Details

    • applyToPlaceholders

      @Nonnull public TranslationConfig.Input applyToPlaceholders(@Nonnull String name, @Nonnull String... additionalNames)
      Start an apply_to selector for placeholder names in placeholder_values.
      Parameters:
      name - The first placeholder name to translate.
      additionalNames - Additional placeholder names to translate.
      Returns:
      A selector with category=placeholders and the given items.
    • applyToTemplateRoles

      @Nonnull public TranslationConfig.Input applyToTemplateRoles(@Nonnull TranslationConfig.TemplateRole role, @Nonnull TranslationConfig.TemplateRole... roles)
      Start an apply_to selector for prompt template message roles.
      Parameters:
      role - The first template role to translate.
      roles - The template roles to translate.
      Returns:
      A selector with category=template_roles and the given items.
    • withSourceLanguage

      @Nonnull public TranslationConfig.Input withSourceLanguage(@Nonnull String sourceLanguage)
      Set the source language for this translation.
      Important Note: If no selectors are used, this applies to the whole message. If selectors are used, this applies to the most recently added selector.
      Parameters:
      sourceLanguage - The source language code
      Returns:
      A new Input with the given source language applied.
    • getTargetLanguage

      public String getTargetLanguage()
    • getSourceLanguage

      public String getSourceLanguage()
    • getApplyTo

      @Nullable public List<SAPDocumentTranslationApplyToSelector> getApplyTo()
      Optional selection(s) to translate. If empty or null, translation is applied to the whole message. If used, source language will be applied per selector.
    • 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