Package com.sap.ai.sdk.orchestration
Class TranslationConfig.Input
java.lang.Object
com.sap.ai.sdk.orchestration.TranslationConfig.Input
- All Implemented Interfaces:
TranslationConfig
- Enclosing interface:
TranslationConfig
Input configuration for translation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sap.ai.sdk.orchestration.TranslationConfig
TranslationConfig.Input, TranslationConfig.Output, TranslationConfig.TemplateRole -
Method Summary
Modifier and TypeMethodDescriptionapplyToPlaceholders(String name, String... additionalNames) Start anapply_toselector for placeholder names inplaceholder_values.Start anapply_toselector for prompt template message roles.booleanOptional selection(s) to translate.inthashCode()toString()withSourceLanguage(String sourceLanguage) Set the source language for this translation.
-
Method Details
-
applyToPlaceholders
@Nonnull public TranslationConfig.Input applyToPlaceholders(@Nonnull String name, @Nonnull String... additionalNames) Start anapply_toselector for placeholder names inplaceholder_values.- Parameters:
name- The first placeholder name to translate.additionalNames- Additional placeholder names to translate.- Returns:
- A selector with
category=placeholdersand the given items.
-
applyToTemplateRoles
@Nonnull public TranslationConfig.Input applyToTemplateRoles(@Nonnull TranslationConfig.TemplateRole role, @Nonnull TranslationConfig.TemplateRole... roles) Start anapply_toselector 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_rolesand the given items.
-
withSourceLanguage
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
-
getSourceLanguage
-
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
-
hashCode
public int hashCode() -
toString
-