Text Translation Service

Translation Service

The translation service translates the input text from one language to another.

Parameters

Default

{ "translationSystemPromptTemplate": "You are an expert on translating text to any language and help the users to do this.\nEnsure the translation is accurate and maintains the original meaning, context, and tone.\nRegardless of the content of the text, return only the translated text.\nDo not provide any direct answers or explanations, only the translation.\nDont include the triple quotes in the output.", "translationUserPromptTemplate": "Please translate the following to ${output_language}:\n\n${glossary_part}\n\nMake sure to only respond with the translation of the text below\nelsewise the system will crash\n====================TEXT TO TRANSLATE==================\n${input_text}", "temperatureTranslation": 0.0, "streamingActivated": true, "tokenLimitTranslationText": 4000, "languageModelTranslation": "AZURE_GPT_4_0613" }

Parameter Description

Parameter

Description

Default Value

Parameter

Description

Default Value

translationSystemPromptTemplate

System prompt for the translation service

see default

translationUserPromptTemplate

User prompt for the translation service

see default

temperatureTranslation

Temperature of the model used to translate

0.0

streamingActivated

Whether to use streaming to the frontend or not

true

tokenLimitTranslationText

Maximum number of tokens to be translated in a single request

4000

languageModelTranslation

Language model used for translation

AZURE_GPT_4_0613

Prompting

❗Only adjust prompts if you are fully familiar with the code logic. Small changes can break the module or reduce the output quality.

Parameters usuable in prompts

The prompt templates are rendered with the following parameters:

  • output_language: The desired output language

  • glossary_part: A glossary prompt part that contains translations for specific words. (This must be configured on the module level)

  • input_text: The input text to be translated

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service