mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
Pass --context_paragraph_limit option from CLI (#437)
This commit is contained in:
parent
a36b488ca7
commit
daea974d68
@ -440,6 +440,7 @@ So you are close to reaching the limit. You have to choose your own value, there
|
|||||||
prompt_config=parse_prompt_arg(options.prompt_arg),
|
prompt_config=parse_prompt_arg(options.prompt_arg),
|
||||||
single_translate=options.single_translate,
|
single_translate=options.single_translate,
|
||||||
context_flag=options.context_flag,
|
context_flag=options.context_flag,
|
||||||
|
context_paragraph_limit=options.context_paragraph_limit,
|
||||||
temperature=options.temperature,
|
temperature=options.temperature,
|
||||||
)
|
)
|
||||||
# other options
|
# other options
|
||||||
|
@ -33,8 +33,8 @@ class EPUBBookLoader(BaseBookLoader):
|
|||||||
prompt_config=None,
|
prompt_config=None,
|
||||||
single_translate=False,
|
single_translate=False,
|
||||||
context_flag=False,
|
context_flag=False,
|
||||||
temperature=1.0,
|
|
||||||
context_paragraph_limit=0,
|
context_paragraph_limit=0,
|
||||||
|
temperature=1.0,
|
||||||
):
|
):
|
||||||
self.epub_name = epub_name
|
self.epub_name = epub_name
|
||||||
self.new_epub = epub.EpubBook()
|
self.new_epub = epub.EpubBook()
|
||||||
|
@ -25,6 +25,7 @@ class SRTBookLoader(BaseBookLoader):
|
|||||||
prompt_config=None,
|
prompt_config=None,
|
||||||
single_translate=False,
|
single_translate=False,
|
||||||
context_flag=False,
|
context_flag=False,
|
||||||
|
context_paragraph_limit=0,
|
||||||
temperature=1.0,
|
temperature=1.0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.srt_name = srt_name
|
self.srt_name = srt_name
|
||||||
|
@ -20,6 +20,7 @@ class TXTBookLoader(BaseBookLoader):
|
|||||||
prompt_config=None,
|
prompt_config=None,
|
||||||
single_translate=False,
|
single_translate=False,
|
||||||
context_flag=False,
|
context_flag=False,
|
||||||
|
context_paragraph_limit=0,
|
||||||
temperature=1.0,
|
temperature=1.0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.txt_name = txt_name
|
self.txt_name = txt_name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user