File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -802,6 +802,7 @@ def translate_document(
802802 target_lang : str ,
803803 formality : Union [str , Formality ] = Formality .DEFAULT ,
804804 glossary : Union [str , GlossaryInfo , None ] = None ,
805+ filename : Optional [str ] = None ,
805806 ) -> None :
806807 """Upload document, translate it into the target language, and download
807808 result.
@@ -819,6 +820,8 @@ def translate_document(
819820 Formality enum, "less" or "more".
820821 :param glossary: (Optional) glossary or glossary ID to use for
821822 translation. Must match specified source_lang and target_lang.
823+ :param filename: (Optional) Filename including extension, only required
824+ if uploading string or bytes containing file content.
822825
823826 :raises DocumentTranslationException: If an error occurs during
824827 translation, the exception includes the document handle.
@@ -830,6 +833,7 @@ def translate_document(
830833 source_lang = source_lang ,
831834 formality = formality ,
832835 glossary = glossary ,
836+ filename = filename ,
833837 )
834838
835839 try :
You can’t perform that action at this time.
0 commit comments