Text Translation Service — Unique AI Documentation

Text Translation Service

1 min read

Translation Service

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

Parameters

Default

json

{
    "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,
    "translationExamplesIgnored": false,
    "allowedInputLanguages": [\
            "Afrikaans", "Albanian", "Arabic", "Aragonese", "Armenian", "Azeri", "Bashkir",\
            "Basque", "Belarusian", "Bengali", "Bislama", "Bosnian", "Breton", "Bulgarian",\
            "Burmese", "Catalan", "Chamorro", "Chechen", "Chinese", "Cornish", "Corsican",\
            "Croatian", "Czech", "Danish", "Dutch", "English", "Esperanto", "Estonian", "Ewe",\
            "Faroese", "Fijian", "Finnish", "French", "Galician", "Georgian", "German", "Greek",\
            "Greenlandic", "Guaraní", "Haitian Creole", "Hausa", "Hebrew", "Hindi", "Hungarian",\
            "Icelandic", "Ido", "Indonesian", "Interlingua", "Interlingue", "Inuktitut", "Irish",\
            "Italian", "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer", "Korean", "Kurdish",\
            "Kyrgyz", "Lao", "Latin", "Latvian", "Limburgish", "Lingala", "Lithuanian", "Luxembourgish",\
            "Macedonian", "Malagasy", "Malay", "Malayalam", "Maltese", "Manx", "Maori", "Marathi",\
            "Marshallese", "Mongolian", "Navajo", "Nepali", "Northern Sami", "Norwegian", "Norwegian Bokmål",\
            "Norwegian Nynorsk", "Occitan", "Ojibwe", "Old Church Slavonic", "Ossetian", "Pashto", "Persian",\
            "Polish", "Portuguese", "Punjabi", "Quechua", "Romanian", "Romansch", "Russian", "Samoan", "Sanskrit",\
            "Sardinian", "Scottish Gaelic", "Serbian", "Serbo-Croatian", "Sichuan Yi", "Sindhi", "Slovak",\
            "Slovene", "Somali", "Spanish", "Sundanese", "Swahili", "Swedish", "Tagalog", "Tahitian", "Tajik",\
            "Tamil", "Tatar", "Telugu", "Thai", "Tibetan", "Tongan", "Tswana", "Turkish", "Turkmen", "Ukrainian",\
            "Urdu", "Uyghur", "Uzbek", "Vietnamese", "Volapük", "Walloon", "Welsh", "West Frisian", "Yiddish",\
            "Yoruba", "Zhuang", "Zulu"],
    "languageModelTranslation": "AZURE_GPT_4_0613"
}

Parameter Description

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
translationExamplesIgnored If the translation examples (few-shot learning) should be ignored. false
allowedInputLanguages Languages that can be recognized to use correspondingly configured few-shot examples, glossary for translation and postprocessing of text. See below
languageModelTranslation Language model used for translation AZURE_GPT_4_0613

allowedInputLanguages

This parameter is relevant when using the GlossaryService and PostProcessingService as for these service to work the input language must be recognized unambiguously.

Supported are:

"Afrikaans", "Albanian", "Arabic", "Aragonese", "Armenian", "Azeri", "Bashkir",
"Basque", "Belarusian", "Bengali", "Bislama", "Bosnian", "Breton", "Bulgarian",
"Burmese", "Catalan", "Chamorro", "Chechen", "Chinese", "Cornish", "Corsican",
"Croatian", "Czech", "Danish", "Dutch", "English", "Esperanto", "Estonian", "Ewe",
"Faroese", "Fijian", "Finnish", "French", "Galician", "Georgian", "German", "Greek",
"Greenlandic", "Guaraní", "Haitian Creole", "Hausa", "Hebrew", "Hindi", "Hungarian",
"Icelandic", "Ido", "Indonesian", "Interlingua", "Interlingue", "Inuktitut", "Irish",
"Italian", "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer", "Korean", "Kurdish",
"Kyrgyz", "Lao", "Latin", "Latvian", "Limburgish", "Lingala", "Lithuanian", "Luxembourgish",
"Macedonian", "Malagasy", "Malay", "Malayalam", "Maltese", "Manx", "Maori", "Marathi",
"Marshallese", "Mongolian", "Navajo", "Nepali", "Northern Sami", "Norwegian", "Norwegian Bokmål",
"Norwegian Nynorsk", "Occitan", "Ojibwe", "Old Church Slavonic", "Ossetian", "Pashto", "Persian",
"Polish", "Portuguese", "Punjabi", "Quechua", "Romanian", "Romansch", "Russian", "Samoan", "Sanskrit",
"Sardinian", "Scottish Gaelic", "Serbian", "Serbo-Croatian", "Sichuan Yi", "Sindhi", "Slovak",
"Slovene", "Somali", "Spanish", "Sundanese", "Swahili", "Swedish", "Tagalog", "Tahitian", "Tajik",
"Tamil", "Tatar", "Telugu", "Thai", "Tibetan", "Tongan", "Tswana", "Turkish", "Turkmen", "Ukrainian",
"Urdu", "Uyghur", "Uzbek", "Vietnamese", "Volapük", "Walloon", "Welsh", "West Frisian", "Yiddish",
"Yoruba", "Zhuang", "Zulu"

Prompting

Parameters usuable in prompts

The prompt templates are rendered with the following parameters: