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 @@ -851,6 +851,7 @@ def translate_document(
851851 target_lang : str ,
852852 formality : Union [str , Formality ] = Formality .DEFAULT ,
853853 glossary : Union [str , GlossaryInfo , None ] = None ,
854+ filename : Optional [str ] = None ,
854855 ) -> DocumentStatus :
855856 """Upload document, translate it into the target language, and download
856857 result.
@@ -868,6 +869,8 @@ def translate_document(
868869 Formality enum, "less" or "more".
869870 :param glossary: (Optional) glossary or glossary ID to use for
870871 translation. Must match specified source_lang and target_lang.
872+ :param filename: (Optional) Filename including extension, only required
873+ if uploading string or bytes containing file content.
871874 :return: DocumentStatus when document translation completed, this
872875 allows the number of billed characters to be queried.
873876
@@ -881,6 +884,7 @@ def translate_document(
881884 source_lang = source_lang ,
882885 formality = formality ,
883886 glossary = glossary ,
887+ filename = filename ,
884888 )
885889
886890 try :
You can’t perform that action at this time.
0 commit comments