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(
802
802
target_lang : str ,
803
803
formality : Union [str , Formality ] = Formality .DEFAULT ,
804
804
glossary : Union [str , GlossaryInfo , None ] = None ,
805
+ filename : Optional [str ] = None ,
805
806
) -> None :
806
807
"""Upload document, translate it into the target language, and download
807
808
result.
@@ -819,6 +820,8 @@ def translate_document(
819
820
Formality enum, "less" or "more".
820
821
:param glossary: (Optional) glossary or glossary ID to use for
821
822
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.
822
825
823
826
:raises DocumentTranslationException: If an error occurs during
824
827
translation, the exception includes the document handle.
@@ -830,6 +833,7 @@ def translate_document(
830
833
source_lang = source_lang ,
831
834
formality = formality ,
832
835
glossary = glossary ,
836
+ filename = filename ,
833
837
)
834
838
835
839
try :
You can’t perform that action at this time.
0 commit comments