File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed
translator/translator_impl Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 3030
3131# from pdf2zh_next.high_level import translate, translate_stream
3232
33- __version__ = "2.6.3 "
33+ __version__ = "2.6.4 "
3434__author__ = "Byaidu, awwaawwa"
3535__license__ = "AGPL-3.0"
3636__maintainer__ = "awwaawwa"
Original file line number Diff line number Diff line change 1- __version__ = "2.6.3 "
1+ __version__ = "2.6.4 "
22__major_version__ = "2"
33__config_file_version__ = "3"
44
Original file line number Diff line number Diff line change 1414from pdf2zh_next .config import ConfigManager
1515from pdf2zh_next .high_level import do_translate_file_async
1616
17- __version__ = "2.6.3 "
17+ __version__ = "2.6.4 "
1818
1919logger = logging .getLogger (__name__ )
2020
Original file line number Diff line number Diff line change @@ -37,9 +37,14 @@ def __init__(
3737 self .prompt_token_count = AtomicInteger ()
3838 self .completion_token_count = AtomicInteger ()
3939
40+ if "qwen-mt" not in self .model :
41+ raise ValueError (
42+ f"Model { self .model } is not a Qwen-MT model, Other Qwen models should use AliyunDashScope or OpenAICompatible."
43+ )
44+
4045 def lang_mapping (self , input_lang : str ) -> str :
4146 """
42- Mapping the language code to the language code that Aliyun Qwen-Mt model supports.
47+ Mapping the language code to the language code that Aliyun Qwen-MT model supports.
4348 Since all existings languagues codes used in gui.py are able to be mapped, the original
4449 languague code will not be checked.
4550 """
Original file line number Diff line number Diff line change 11[project ]
22name = " pdf2zh-next"
3- version = " 2.6.3 "
3+ version = " 2.6.4 "
44description = " Latex PDF Translator"
55authors = [
66 {
name =
" awwaawwa" ,
email =
" [email protected] " },
@@ -83,7 +83,7 @@ max-line-length = 88
8383
8484
8585[bumpver ]
86- current_version = " 2.6.3 "
86+ current_version = " 2.6.4 "
8787version_pattern = " MAJOR.MINOR.PATCH[.PYTAGNUM]"
8888
8989[bumpver .file_patterns ]
You can’t perform that action at this time.
0 commit comments