Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 2.65 KB

File metadata and controls

43 lines (34 loc) · 2.65 KB

TranslateRequest

Properties

Name Type Description Notes
text TranslateRequestText
source_lang str Source language code (ISO-639) or "auto" for automatic detection [optional] [default to 'auto']
target_lang str Target language code (ISO-639) [optional] [default to 'en']
var_from str Legacy parameter for source language (use source_lang instead) [optional]
to str Legacy parameter for target language (use target_lang instead) [optional]
context str Additional context to improve translation accuracy [optional]
preserve_formatting bool Whether to preserve original text formatting [optional] [default to False]
formality str Level of formality in translation. All formality levels are supported for all language pairs. 'prefer_more' is same as 'more', and 'prefer_less' is same as 'less' (included for backwards compatibility). [optional] [default to 'default']
speaker_gender str Gender of the speaker for languages with gender-specific expressions [optional] [default to 'unknown']
addressee_gender str Gender of the addressee for languages with gender-specific expressions [optional] [default to 'unknown']
translation_style str Style of translation (natural for fluency, literal for exactness) [optional] [default to 'natural']
predicted_language str Pre-detected source language (if available) [optional]
prediction str Pre-generated translation (if available) [optional]
stream bool Whether to stream the response as Server-Sent Events [optional] [default to False]
dictionary_language str Language code for dictionary definitions (if not provided, the source language will be used) [optional]

Example

from openapi_client.models.translate_request import TranslateRequest

# TODO update the JSON string below
json = "{}"
# create an instance of TranslateRequest from a JSON string
translate_request_instance = TranslateRequest.from_json(json)
# print the JSON string representation of the object
print(TranslateRequest.to_json())

# convert the object into a dict
translate_request_dict = translate_request_instance.to_dict()
# create an instance of TranslateRequest from a dict
translate_request_from_dict = TranslateRequest.from_dict(translate_request_dict)

[Back to Model list] [Back to API list] [Back to README]