Pass --context_paragraph_limit option from CLI (#437)

This commit is contained in:
cce 2024-12-06 23:28:30 -05:00 committed by GitHub
parent a36b488ca7
commit daea974d68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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