DeepsetDeepLDocumentTranslator Parameters

Check the init and runtime parameters you can pass for this component.

YAML Init Parameters

You can specify the following parameters for DeepsetDeepLDocumentTranslator in the pipeline YAML:

ParameterTypePossible valuesDescription
target_languagesList of stringsFor a list of possible options, see DeepL documentation.Codes of languages you want to translate your documents into.
Required.
source_languageStringDefault: NoneThe language of the documents you want to translate. If None, it's automatically detected. For a list of possible options, see DeepL documentation.
Optional.
api_keySecretDefault: Secret.from_env_var("DEEPL_API_TOKEN")The DeepL API key.
Required.
preserve_formattingBooleanDefault: TrueControls automatic formatting correction. When True, prevents automatic correction of formatting.
Optional
contextStringDefault: NoneUse this parameter to include additional context that can influence a translation without being translated itself. Providing additional context can potentially improve translation quality, especially for short, low-context source texts such as product names on an e-commerce website, article headlines on a news website, or UI elements. For details, see DeepL API documentation.
Optional.
formalityStringless
more
Default: None
Controls whether translations lean toward informal or formal language. This works only for target languages: German (DE), French (FR), Italian (IT), Spanish (ES), Dutch (NL), Polish (PL), Portugese (PT_BR and PT_PT), Japanese (JA), and Russian (RU). Possible values:

- less: Uses more informal language
- more: Uses more polite and formal language.
Optional.

REST API Runtime Parameters

There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.