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(
851
851
target_lang : str ,
852
852
formality : Union [str , Formality ] = Formality .DEFAULT ,
853
853
glossary : Union [str , GlossaryInfo , None ] = None ,
854
+ filename : Optional [str ] = None ,
854
855
) -> DocumentStatus :
855
856
"""Upload document, translate it into the target language, and download
856
857
result.
@@ -868,6 +869,8 @@ def translate_document(
868
869
Formality enum, "less" or "more".
869
870
:param glossary: (Optional) glossary or glossary ID to use for
870
871
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.
871
874
:return: DocumentStatus when document translation completed, this
872
875
allows the number of billed characters to be queried.
873
876
@@ -881,6 +884,7 @@ def translate_document(
881
884
source_lang = source_lang ,
882
885
formality = formality ,
883
886
glossary = glossary ,
887
+ filename = filename ,
884
888
)
885
889
886
890
try :
You can’t perform that action at this time.
0 commit comments