mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
130ddf4e90 | ||
![]() |
f4ac49651c | ||
![]() |
433e208925 | ||
![]() |
2b40f0872a | ||
![]() |
4ac29a7d63 | ||
![]() |
e45326f7a8 | ||
![]() |
c780f7c516 | ||
![]() |
cc4f4c4dae | ||
![]() |
57ca4da847 | ||
![]() |
09589c626d | ||
![]() |
750ecd7d93 | ||
![]() |
70a1962804 | ||
![]() |
83303d1dd8 | ||
![]() |
b0dbed8826 | ||
![]() |
6685b23993 | ||
![]() |
a1f0185043 | ||
![]() |
68f21744f5 | ||
![]() |
81f9b5280b | ||
![]() |
bf0a0b8ad5 | ||
![]() |
b83ac10e88 | ||
![]() |
cf992aef70 | ||
![]() |
8bfd1b146d | ||
![]() |
e6b0de14db | ||
![]() |
b7674d734d |
4
.github/workflows/docs.yaml
vendored
4
.github/workflows/docs.yaml
vendored
@ -11,6 +11,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.10'
|
||||
- run: pip install mkdocs mkdocs-material
|
||||
- run: mkdocs gh-deploy --force
|
||||
- run: mkdocs gh-deploy --force
|
||||
|
6
.github/workflows/make_test_ebook.yaml
vendored
6
.github/workflows/make_test_ebook.yaml
vendored
@ -27,10 +27,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: install python 3.9
|
||||
- name: install python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.9'
|
||||
python-version: '3.10'
|
||||
cache: 'pip' # caching pip dependencies
|
||||
- name: Check formatting (black)
|
||||
run: |
|
||||
@ -71,7 +71,7 @@ jobs:
|
||||
|
||||
- name: Rename and Upload ePub
|
||||
if: env.OPENAI_API_KEY != null
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: epub_output
|
||||
path: "test_books/lemo_bilingual.epub"
|
||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -138,3 +138,10 @@ log/
|
||||
*.srt
|
||||
*.txt
|
||||
*.bin
|
||||
*.epub
|
||||
|
||||
# For markdown files in user directories
|
||||
.cursorrules
|
||||
books/
|
||||
prompts/
|
||||
.pdm-python
|
||||
|
@ -1 +0,0 @@
|
||||
/home/yihong/use_now/bilingual_book_maker/.venv/bin/python
|
@ -4,10 +4,10 @@ RUN apt-get update
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt setup.py .
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install -r /app/requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["python3", "make_book.py"]
|
||||
ENTRYPOINT ["python3", "make_book.py"]
|
||||
|
15
README.md
15
README.md
@ -167,6 +167,21 @@ bbook --book_name test_books/animal_farm.epub --openai_key ${openai_key} --test
|
||||
- If you don't need to set the `system` role content, you can simply set it up like this: `--prompt "Translate {text} to {language}."` or `--prompt prompt_template_sample.txt` (example of a text file can be found at [./prompt_template_sample.txt](./prompt_template_sample.txt)).
|
||||
|
||||
- If you need to set the `system` role content, you can use the following format: `--prompt '{"user":"Translate {text} to {language}", "system": "You are a professional translator."}'` or `--prompt prompt_template_sample.json` (example of a JSON file can be found at [./prompt_template_sample.json](./prompt_template_sample.json)).
|
||||
|
||||
- You can now use [PromptDown](https://github.com/btfranklin/promptdown) format (`.md` files) for more structured prompts: `--prompt prompt_md.prompt.md`. PromptDown supports both traditional system messages and developer messages (used by newer AI models). Example:
|
||||
|
||||
```markdown
|
||||
# Translation Prompt
|
||||
|
||||
## Developer Message
|
||||
You are a professional translator who specializes in accurate translations.
|
||||
|
||||
## Conversation
|
||||
|
||||
| Role | Content |
|
||||
|-------|---------------------------------------------------|
|
||||
| User | Please translate the following text into {language}:\n\n{text} |
|
||||
```
|
||||
|
||||
- You can also set the `user` and `system` role prompt by setting environment variables: `BBM_CHATGPTAPI_USER_MSG_TEMPLATE` and `BBM_CHATGPTAPI_SYS_MSG`.
|
||||
|
||||
|
@ -13,7 +13,60 @@ def parse_prompt_arg(prompt_arg):
|
||||
if prompt_arg is None:
|
||||
return prompt
|
||||
|
||||
if not any(prompt_arg.endswith(ext) for ext in [".json", ".txt"]):
|
||||
# Check if it's a path to a markdown file (PromptDown format)
|
||||
if prompt_arg.endswith(".md") and os.path.exists(prompt_arg):
|
||||
try:
|
||||
from promptdown import StructuredPrompt
|
||||
|
||||
structured_prompt = StructuredPrompt.from_promptdown_file(prompt_arg)
|
||||
|
||||
# Initialize our prompt structure
|
||||
prompt = {}
|
||||
|
||||
# Handle developer_message or system_message
|
||||
# Developer message takes precedence if both are present
|
||||
if (
|
||||
hasattr(structured_prompt, "developer_message")
|
||||
and structured_prompt.developer_message
|
||||
):
|
||||
prompt["system"] = structured_prompt.developer_message
|
||||
elif (
|
||||
hasattr(structured_prompt, "system_message")
|
||||
and structured_prompt.system_message
|
||||
):
|
||||
prompt["system"] = structured_prompt.system_message
|
||||
|
||||
# Extract user message from conversation
|
||||
if (
|
||||
hasattr(structured_prompt, "conversation")
|
||||
and structured_prompt.conversation
|
||||
):
|
||||
for message in structured_prompt.conversation:
|
||||
if message.role.lower() == "user":
|
||||
prompt["user"] = message.content
|
||||
break
|
||||
|
||||
# Ensure we found a user message
|
||||
if "user" not in prompt or not prompt["user"]:
|
||||
raise ValueError(
|
||||
"PromptDown file must contain at least one user message"
|
||||
)
|
||||
|
||||
print(f"Successfully loaded PromptDown file: {prompt_arg}")
|
||||
|
||||
# Validate required placeholders
|
||||
if any(c not in prompt["user"] for c in ["{text}"]):
|
||||
raise ValueError(
|
||||
"User message in PromptDown must contain `{text}` placeholder"
|
||||
)
|
||||
|
||||
return prompt
|
||||
except Exception as e:
|
||||
print(f"Error parsing PromptDown file: {e}")
|
||||
# Fall through to other parsing methods
|
||||
|
||||
# Existing parsing logic for JSON strings and other formats
|
||||
if not any(prompt_arg.endswith(ext) for ext in [".json", ".txt", ".md"]):
|
||||
try:
|
||||
# user can define prompt by passing a json string
|
||||
# eg: --prompt '{"system": "You are a professional translator who translates computer technology books", "user": "Translate \`{text}\` to {language}"}'
|
||||
@ -349,7 +402,17 @@ So you are close to reaching the limit. You have to choose your own value, there
|
||||
translate_model = MODEL_DICT.get(options.model)
|
||||
assert translate_model is not None, "unsupported model"
|
||||
API_KEY = ""
|
||||
if options.model in ["openai", "chatgptapi", "gpt4", "gpt4omini", "gpt4o"]:
|
||||
if options.model in [
|
||||
"openai",
|
||||
"chatgptapi",
|
||||
"gpt4",
|
||||
"gpt4omini",
|
||||
"gpt4o",
|
||||
"o1preview",
|
||||
"o1",
|
||||
"o1mini",
|
||||
"o3mini",
|
||||
]:
|
||||
if OPENAI_API_KEY := (
|
||||
options.openai_key
|
||||
or env.get(
|
||||
@ -471,6 +534,10 @@ So you are close to reaching the limit. You have to choose your own value, there
|
||||
"gpt4",
|
||||
"gpt4omini",
|
||||
"gpt4o",
|
||||
"o1",
|
||||
"o1preview",
|
||||
"o1mini",
|
||||
"o3mini",
|
||||
], "only support chatgptapi for deployment_id"
|
||||
if not options.api_base:
|
||||
raise ValueError("`api_base` must be provided when using `deployment_id`")
|
||||
@ -495,6 +562,14 @@ So you are close to reaching the limit. You have to choose your own value, there
|
||||
e.translate_model.set_gpt4omini_models()
|
||||
if options.model == "gpt4o":
|
||||
e.translate_model.set_gpt4o_models()
|
||||
if options.model == "o1preview":
|
||||
e.translate_model.set_o1preview_models()
|
||||
if options.model == "o1":
|
||||
e.translate_model.set_o1_models()
|
||||
if options.model == "o1mini":
|
||||
e.translate_model.set_o1mini_models()
|
||||
if options.model == "o3mini":
|
||||
e.translate_model.set_o3mini_models()
|
||||
if options.model.startswith("claude-"):
|
||||
e.translate_model.set_claude_model(options.model)
|
||||
if options.block_size > 0:
|
||||
|
@ -16,6 +16,10 @@ MODEL_DICT = {
|
||||
"gpt4": ChatGPTAPI,
|
||||
"gpt4omini": ChatGPTAPI,
|
||||
"gpt4o": ChatGPTAPI,
|
||||
"o1preview": ChatGPTAPI,
|
||||
"o1": ChatGPTAPI,
|
||||
"o1mini": ChatGPTAPI,
|
||||
"o3mini": ChatGPTAPI,
|
||||
"google": Google,
|
||||
"caiyun": Caiyun,
|
||||
"deepl": DeepL,
|
||||
|
@ -48,6 +48,21 @@ GPT4o_MODEL_LIST = [
|
||||
"gpt-4o-2024-08-06",
|
||||
"chatgpt-4o-latest",
|
||||
]
|
||||
O1PREVIEW_MODEL_LIST = [
|
||||
"o1-preview",
|
||||
"o1-preview-2024-09-12",
|
||||
]
|
||||
O1_MODEL_LIST = [
|
||||
"o1",
|
||||
"o1-2024-12-17",
|
||||
]
|
||||
O1MINI_MODEL_LIST = [
|
||||
"o1-mini",
|
||||
"o1-mini-2024-09-12",
|
||||
]
|
||||
O3MINI_MODEL_LIST = [
|
||||
"o3-mini",
|
||||
]
|
||||
|
||||
|
||||
class ChatGPTAPI(Base):
|
||||
@ -215,40 +230,6 @@ class ChatGPTAPI(Base):
|
||||
lines = [line.strip() for line in lines if line.strip() != ""]
|
||||
return lines
|
||||
|
||||
def get_best_result_list(
|
||||
self,
|
||||
plist_len,
|
||||
new_str,
|
||||
sleep_dur,
|
||||
result_list,
|
||||
max_retries=15,
|
||||
):
|
||||
if len(result_list) == plist_len:
|
||||
return result_list, 0
|
||||
|
||||
best_result_list = result_list
|
||||
retry_count = 0
|
||||
|
||||
while retry_count < max_retries and len(result_list) != plist_len:
|
||||
print(
|
||||
f"bug: {plist_len} -> {len(result_list)} : Number of paragraphs before and after translation",
|
||||
)
|
||||
print(f"sleep for {sleep_dur}s and retry {retry_count+1} ...")
|
||||
time.sleep(sleep_dur)
|
||||
retry_count += 1
|
||||
result_list = self.translate_and_split_lines(new_str)
|
||||
if (
|
||||
len(result_list) == plist_len
|
||||
or len(best_result_list) < len(result_list) <= plist_len
|
||||
or (
|
||||
len(result_list) < len(best_result_list)
|
||||
and len(best_result_list) > plist_len
|
||||
)
|
||||
):
|
||||
best_result_list = result_list
|
||||
|
||||
return best_result_list, retry_count
|
||||
|
||||
def log_retry(self, state, retry_count, elapsed_time, log_path="log/buglog.txt"):
|
||||
if retry_count == 0:
|
||||
return
|
||||
@ -318,48 +299,131 @@ class ChatGPTAPI(Base):
|
||||
return new_text
|
||||
|
||||
def translate_list(self, plist):
|
||||
sep = "\n\n\n\n\n"
|
||||
# new_str = sep.join([item.text for item in plist])
|
||||
plist_len = len(plist)
|
||||
|
||||
new_str = ""
|
||||
i = 1
|
||||
for p in plist:
|
||||
# Create a list of original texts and add clear numbering markers to each paragraph
|
||||
formatted_text = ""
|
||||
for i, p in enumerate(plist, 1):
|
||||
temp_p = copy(p)
|
||||
for sup in temp_p.find_all("sup"):
|
||||
sup.extract()
|
||||
new_str += f"({i}) {temp_p.get_text().strip()}{sep}"
|
||||
i = i + 1
|
||||
para_text = temp_p.get_text().strip()
|
||||
# Using special delimiters and clear numbering
|
||||
formatted_text += f"PARAGRAPH {i}:\n{para_text}\n\n"
|
||||
|
||||
if new_str.endswith(sep):
|
||||
new_str = new_str[: -len(sep)]
|
||||
print(f"plist len = {plist_len}")
|
||||
|
||||
new_str = self.join_lines(new_str)
|
||||
original_prompt_template = self.prompt_template
|
||||
|
||||
plist_len = len(plist)
|
||||
|
||||
print(f"plist len = {len(plist)}")
|
||||
|
||||
result_list = self.translate_and_split_lines(new_str)
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
result_list, retry_count = self.get_best_result_list(
|
||||
plist_len,
|
||||
new_str,
|
||||
6, # WTF this magic number here?
|
||||
result_list,
|
||||
structured_prompt = (
|
||||
f"Translate the following {plist_len} paragraphs to {{language}}. "
|
||||
f"CRUCIAL INSTRUCTION: Format your response using EXACTLY this structure:\n\n"
|
||||
f"TRANSLATION OF PARAGRAPH 1:\n[Your translation of paragraph 1 here]\n\n"
|
||||
f"TRANSLATION OF PARAGRAPH 2:\n[Your translation of paragraph 2 here]\n\n"
|
||||
f"... and so on for all {plist_len} paragraphs.\n\n"
|
||||
f"You MUST provide EXACTLY {plist_len} translated paragraphs. "
|
||||
f"Do not merge, split, or rearrange paragraphs. "
|
||||
f"Translate each paragraph independently but consistently. "
|
||||
f"Keep all numbers and special formatting in your translation. "
|
||||
f"Each original paragraph must correspond to exactly one translated paragraph."
|
||||
)
|
||||
|
||||
end_time = time.time()
|
||||
self.prompt_template = structured_prompt + " ```{text}```"
|
||||
|
||||
state = "fail" if len(result_list) != plist_len else "success"
|
||||
log_path = "log/buglog.txt"
|
||||
translated_text = self.translate(formatted_text, False)
|
||||
|
||||
self.log_retry(state, retry_count, end_time - start_time, log_path)
|
||||
self.log_translation_mismatch(plist_len, result_list, new_str, sep, log_path)
|
||||
# Extract translations from structured output
|
||||
translated_paragraphs = []
|
||||
for i in range(1, plist_len + 1):
|
||||
pattern = (
|
||||
r"TRANSLATION OF PARAGRAPH "
|
||||
+ str(i)
|
||||
+ r":(.*?)(?=TRANSLATION OF PARAGRAPH \d+:|\Z)"
|
||||
)
|
||||
matches = re.findall(pattern, translated_text, re.DOTALL)
|
||||
|
||||
if matches:
|
||||
translated_paragraph = matches[0].strip()
|
||||
translated_paragraphs.append(translated_paragraph)
|
||||
else:
|
||||
print(f"Warning: Could not find translation for paragraph {i}")
|
||||
loose_pattern = (
|
||||
r"(?:TRANSLATION|PARAGRAPH|PARA).*?"
|
||||
+ str(i)
|
||||
+ r".*?:(.*?)(?=(?:TRANSLATION|PARAGRAPH|PARA).*?\d+.*?:|\Z)"
|
||||
)
|
||||
loose_matches = re.findall(loose_pattern, translated_text, re.DOTALL)
|
||||
if loose_matches:
|
||||
translated_paragraphs.append(loose_matches[0].strip())
|
||||
else:
|
||||
translated_paragraphs.append("")
|
||||
|
||||
self.prompt_template = original_prompt_template
|
||||
|
||||
# If the number of extracted paragraphs is incorrect, try the alternative extraction method.
|
||||
if len(translated_paragraphs) != plist_len:
|
||||
print(
|
||||
f"Warning: Extracted {len(translated_paragraphs)}/{plist_len} paragraphs. Using fallback extraction."
|
||||
)
|
||||
|
||||
all_para_pattern = r"(?:TRANSLATION|PARAGRAPH|PARA).*?(\d+).*?:(.*?)(?=(?:TRANSLATION|PARAGRAPH|PARA).*?\d+.*?:|\Z)"
|
||||
all_matches = re.findall(all_para_pattern, translated_text, re.DOTALL)
|
||||
|
||||
if all_matches:
|
||||
# Create a dictionary to map translation content based on paragraph numbers
|
||||
para_dict = {}
|
||||
for num_str, content in all_matches:
|
||||
try:
|
||||
num = int(num_str)
|
||||
if 1 <= num <= plist_len:
|
||||
para_dict[num] = content.strip()
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
# Rebuild the translation list in the original order
|
||||
new_translated_paragraphs = []
|
||||
for i in range(1, plist_len + 1):
|
||||
if i in para_dict:
|
||||
new_translated_paragraphs.append(para_dict[i])
|
||||
else:
|
||||
new_translated_paragraphs.append("")
|
||||
|
||||
if len(new_translated_paragraphs) == plist_len:
|
||||
translated_paragraphs = new_translated_paragraphs
|
||||
|
||||
if len(translated_paragraphs) < plist_len:
|
||||
translated_paragraphs.extend(
|
||||
[""] * (plist_len - len(translated_paragraphs))
|
||||
)
|
||||
elif len(translated_paragraphs) > plist_len:
|
||||
translated_paragraphs = translated_paragraphs[:plist_len]
|
||||
|
||||
return translated_paragraphs
|
||||
|
||||
def extract_paragraphs(self, text, paragraph_count):
|
||||
"""Extract paragraphs from translated text, ensuring paragraph count is preserved."""
|
||||
# First try to extract by paragraph numbers (1), (2), etc.
|
||||
result_list = []
|
||||
for i in range(1, paragraph_count + 1):
|
||||
pattern = rf"\({i}\)\s*(.*?)(?=\s*\({i + 1}\)|\Z)"
|
||||
match = re.search(pattern, text, re.DOTALL)
|
||||
if match:
|
||||
result_list.append(match.group(1).strip())
|
||||
|
||||
# If exact pattern matching failed, try another approach
|
||||
if len(result_list) != paragraph_count:
|
||||
pattern = r"\((\d+)\)\s*(.*?)(?=\s*\(\d+\)|\Z)"
|
||||
matches = re.findall(pattern, text, re.DOTALL)
|
||||
if matches:
|
||||
# Sort by paragraph number
|
||||
matches.sort(key=lambda x: int(x[0]))
|
||||
result_list = [match[1].strip() for match in matches]
|
||||
|
||||
# Fallback to original line-splitting approach
|
||||
if len(result_list) != paragraph_count:
|
||||
lines = text.splitlines()
|
||||
result_list = [line.strip() for line in lines if line.strip() != ""]
|
||||
|
||||
# del (num), num. sometime (num) will translated to num.
|
||||
result_list = [re.sub(r"^(\(\d+\)|\d+\.|(\d+))\s*", "", s) for s in result_list]
|
||||
return result_list
|
||||
|
||||
def set_deployment_id(self, deployment_id):
|
||||
@ -422,6 +486,54 @@ class ChatGPTAPI(Base):
|
||||
print(f"Using model list {model_list}")
|
||||
self.model_list = cycle(model_list)
|
||||
|
||||
def set_o1preview_models(self):
|
||||
# for issue #375 azure can not use model list
|
||||
if self.deployment_id:
|
||||
self.model_list = cycle(["o1-preview"])
|
||||
else:
|
||||
my_model_list = [
|
||||
i["id"] for i in self.openai_client.models.list().model_dump()["data"]
|
||||
]
|
||||
model_list = list(set(my_model_list) & set(O1PREVIEW_MODEL_LIST))
|
||||
print(f"Using model list {model_list}")
|
||||
self.model_list = cycle(model_list)
|
||||
|
||||
def set_o1_models(self):
|
||||
# for issue #375 azure can not use model list
|
||||
if self.deployment_id:
|
||||
self.model_list = cycle(["o1"])
|
||||
else:
|
||||
my_model_list = [
|
||||
i["id"] for i in self.openai_client.models.list().model_dump()["data"]
|
||||
]
|
||||
model_list = list(set(my_model_list) & set(O1_MODEL_LIST))
|
||||
print(f"Using model list {model_list}")
|
||||
self.model_list = cycle(model_list)
|
||||
|
||||
def set_o1mini_models(self):
|
||||
# for issue #375 azure can not use model list
|
||||
if self.deployment_id:
|
||||
self.model_list = cycle(["o1-mini"])
|
||||
else:
|
||||
my_model_list = [
|
||||
i["id"] for i in self.openai_client.models.list().model_dump()["data"]
|
||||
]
|
||||
model_list = list(set(my_model_list) & set(O1MINI_MODEL_LIST))
|
||||
print(f"Using model list {model_list}")
|
||||
self.model_list = cycle(model_list)
|
||||
|
||||
def set_o3mini_models(self):
|
||||
# for issue #375 azure can not use model list
|
||||
if self.deployment_id:
|
||||
self.model_list = cycle(["o3-mini"])
|
||||
else:
|
||||
my_model_list = [
|
||||
i["id"] for i in self.openai_client.models.list().model_dump()["data"]
|
||||
]
|
||||
model_list = list(set(my_model_list) & set(O3MINI_MODEL_LIST))
|
||||
print(f"Using model list {model_list}")
|
||||
self.model_list = cycle(model_list)
|
||||
|
||||
def set_model_list(self, model_list):
|
||||
model_list = list(set(model_list))
|
||||
print(f"Using model list {model_list}")
|
||||
|
@ -44,6 +44,7 @@ GEMINIFLASH_MODEL_LIST = [
|
||||
"gemini-1.5-flash-001",
|
||||
"gemini-1.5-flash-002",
|
||||
"gemini-2.0-flash-exp",
|
||||
"gemini-2.5-flash-preview-04-17",
|
||||
]
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ import re
|
||||
import requests
|
||||
from rich import print
|
||||
|
||||
|
||||
from book_maker.utils import TO_LANGUAGE_CODE, LANGUAGES
|
||||
from .base_translator import Base
|
||||
|
||||
|
||||
@ -13,7 +13,14 @@ class Google(Base):
|
||||
|
||||
def __init__(self, key, language, **kwargs) -> None:
|
||||
super().__init__(key, language)
|
||||
self.api_url = "https://translate.google.com/translate_a/single?client=it&dt=qca&dt=t&dt=rmt&dt=bd&dt=rms&dt=sos&dt=md&dt=gt&dt=ld&dt=ss&dt=ex&otf=2&dj=1&hl=en&ie=UTF-8&oe=UTF-8&sl=auto&tl=zh-CN"
|
||||
|
||||
# Convert language name to code if needed, otherwise use as-is
|
||||
if language.lower() in TO_LANGUAGE_CODE:
|
||||
language_code = TO_LANGUAGE_CODE[language.lower()]
|
||||
else:
|
||||
language_code = language
|
||||
|
||||
self.api_url = f"https://translate.google.com/translate_a/single?client=it&dt=qca&dt=t&dt=rmt&dt=bd&dt=rms&dt=sos&dt=md&dt=gt&dt=ld&dt=ss&dt=ex&otf=2&dj=1&hl=en&ie=UTF-8&oe=UTF-8&sl=auto&tl={language_code}"
|
||||
self.headers = {
|
||||
"Content-Type": "application/x-www-form-urlencoded",
|
||||
"User-Agent": "GoogleTranslate/6.29.59279 (iPhone; iOS 15.4; en; iPhone14,2)",
|
||||
|
@ -2,7 +2,7 @@
|
||||
## Models
|
||||
`-m, --model <Model>` <br>
|
||||
|
||||
Currently `bbook_maker` supports these models: `chatgptapi` , `gpt3` , `google` , `caiyun` , `deepl` , `deeplfree` , `gpt4` , `gpt4omini` , `claude` , `customapi`.
|
||||
Currently `bbook_maker` supports these models: `chatgptapi` , `gpt3` , `google` , `caiyun` , `deepl` , `deeplfree` , `gpt4` , `gpt4omini` , `o1-preview` , `o1` , `o1-mini` , `o3-mini` , `claude` , `customapi`.
|
||||
Default model is `chatgptapi` .
|
||||
|
||||
### OPENAI models
|
||||
|
@ -19,6 +19,32 @@ To tweak the prompt, use the `--prompt` parameter. Valid placeholders for the `u
|
||||
|
||||
You can also set the `user` and `system` role prompt by setting environment variables: `BBM_CHATGPTAPI_USER_MSG_TEMPLATE` and `BBM_CHATGPTAPI_SYS_MSG`.
|
||||
|
||||
- You can now use PromptDown format (`.md` files) for more structured prompts: `--prompt prompt_md.prompt.md`
|
||||
|
||||
# Translation Prompt
|
||||
|
||||
## System Message
|
||||
You are a professional translator who specializes in accurate translations.
|
||||
|
||||
## Conversation
|
||||
|
||||
| Role | Content |
|
||||
|-------|------------------------------------------|
|
||||
| User | Please translate the following text into {language}:\n\n{text} |
|
||||
|
||||
# OR using Developer Message (for newer AI models)
|
||||
|
||||
# Translation Prompt
|
||||
|
||||
## Developer Message
|
||||
You are a professional translator who specializes in accurate translations.
|
||||
|
||||
## Conversation
|
||||
|
||||
| Role | Content |
|
||||
|-------|------------------------------------------|
|
||||
| User | Please translate the following text into {language}:\n\n{text} |
|
||||
|
||||
## Examples
|
||||
```sh
|
||||
python3 make_book.py --book_name test_books/animal_farm.epub --prompt prompt_template_sample.txt
|
||||
|
335
pdm.lock
generated
335
pdm.lock
generated
@ -4,8 +4,11 @@
|
||||
[metadata]
|
||||
groups = ["default"]
|
||||
strategy = ["cross_platform", "inherit_metadata"]
|
||||
lock_version = "4.4.1"
|
||||
content_hash = "sha256:7792e48118ca2396a823aeef510a3bbec973033b44e04c7d81368e0285275716"
|
||||
lock_version = "4.5.0"
|
||||
content_hash = "sha256:2fb0dba3fe80797eb75ebae386f9bac949e07192d24d6f60f8b5f0f89bc284bc"
|
||||
|
||||
[[metadata.targets]]
|
||||
requires_python = ">=3.10"
|
||||
|
||||
[[package]]
|
||||
name = "aiohttp"
|
||||
@ -105,6 +108,9 @@ version = "0.6.0"
|
||||
requires_python = ">=3.8"
|
||||
summary = "Reusable constraint types to use with typing.Annotated"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"typing-extensions>=4.0.0; python_version < \"3.9\"",
|
||||
]
|
||||
files = [
|
||||
{file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"},
|
||||
{file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"},
|
||||
@ -112,23 +118,22 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "anthropic"
|
||||
version = "0.26.1"
|
||||
requires_python = ">=3.7"
|
||||
version = "0.49.0"
|
||||
requires_python = ">=3.8"
|
||||
summary = "The official Python library for the anthropic API"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"anyio<5,>=3.5.0",
|
||||
"distro<2,>=1.7.0",
|
||||
"httpx<1,>=0.23.0",
|
||||
"jiter<1,>=0.1.0",
|
||||
"jiter<1,>=0.4.0",
|
||||
"pydantic<3,>=1.9.0",
|
||||
"sniffio",
|
||||
"tokenizers>=0.13.0",
|
||||
"typing-extensions<5,>=4.7",
|
||||
"typing-extensions<5,>=4.10",
|
||||
]
|
||||
files = [
|
||||
{file = "anthropic-0.26.1-py3-none-any.whl", hash = "sha256:2812b9b250b551ed8a1f0a7e6ae3f005654098994f45ebca5b5808bd154c9628"},
|
||||
{file = "anthropic-0.26.1.tar.gz", hash = "sha256:26680ff781a6f678a30a1dccd0743631e602b23a47719439ffdef5335fa167d8"},
|
||||
{file = "anthropic-0.49.0-py3-none-any.whl", hash = "sha256:bbc17ad4e7094988d2fa86b87753ded8dce12498f4b85fe5810f208f454a8375"},
|
||||
{file = "anthropic-0.49.0.tar.gz", hash = "sha256:c09e885b0f674b9119b4f296d8508907f6cff0009bc20d5cf6b35936c40b4398"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -155,6 +160,9 @@ requires_python = ">=3.7"
|
||||
summary = "Timeout context manager for asyncio programs"
|
||||
groups = ["default"]
|
||||
marker = "python_version < \"3.11\""
|
||||
dependencies = [
|
||||
"typing-extensions>=3.6.5; python_version < \"3.8\"",
|
||||
]
|
||||
files = [
|
||||
{file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"},
|
||||
{file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"},
|
||||
@ -166,6 +174,9 @@ version = "23.2.0"
|
||||
requires_python = ">=3.7"
|
||||
summary = "Classes Without Boilerplate"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"importlib-metadata; python_version < \"3.8\"",
|
||||
]
|
||||
files = [
|
||||
{file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"},
|
||||
{file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"},
|
||||
@ -465,6 +476,7 @@ summary = "Composable command line interface toolkit"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"colorama; platform_system == \"Windows\"",
|
||||
"importlib-metadata; python_version < \"3.8\"",
|
||||
]
|
||||
files = [
|
||||
{file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
|
||||
@ -614,7 +626,7 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "google-ai-generativelanguage"
|
||||
version = "0.6.4"
|
||||
version = "0.6.15"
|
||||
requires_python = ">=3.7"
|
||||
summary = "Google Ai Generativelanguage API client library"
|
||||
groups = ["default"]
|
||||
@ -622,11 +634,12 @@ dependencies = [
|
||||
"google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.1",
|
||||
"google-auth!=2.24.0,!=2.25.0,<3.0.0dev,>=2.14.1",
|
||||
"proto-plus<2.0.0dev,>=1.22.3",
|
||||
"protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5",
|
||||
"proto-plus<2.0.0dev,>=1.25.0; python_version >= \"3.13\"",
|
||||
"protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<6.0.0dev,>=3.20.2",
|
||||
]
|
||||
files = [
|
||||
{file = "google-ai-generativelanguage-0.6.4.tar.gz", hash = "sha256:1750848c12af96cb24ae1c3dd05e4bfe24867dc4577009ed03e1042d8421e874"},
|
||||
{file = "google_ai_generativelanguage-0.6.4-py3-none-any.whl", hash = "sha256:730e471aa549797118fb1c88421ba1957741433ada575cf5dd08d3aebf903ab1"},
|
||||
{file = "google_ai_generativelanguage-0.6.15-py3-none-any.whl", hash = "sha256:5a03ef86377aa184ffef3662ca28f19eeee158733e45d7947982eb953c6ebb6c"},
|
||||
{file = "google_ai_generativelanguage-0.6.15.tar.gz", hash = "sha256:8f6d9dc4c12b065fe2d0289026171acea5183ebf2d0b11cefe12f3821e159ec3"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -716,12 +729,12 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "google-generativeai"
|
||||
version = "0.5.4"
|
||||
version = "0.8.5"
|
||||
requires_python = ">=3.9"
|
||||
summary = "Google Generative AI High level API client library and tools."
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"google-ai-generativelanguage==0.6.4",
|
||||
"google-ai-generativelanguage==0.6.15",
|
||||
"google-api-core",
|
||||
"google-api-python-client",
|
||||
"google-auth>=2.15.0",
|
||||
@ -731,7 +744,7 @@ dependencies = [
|
||||
"typing-extensions",
|
||||
]
|
||||
files = [
|
||||
{file = "google_generativeai-0.5.4-py3-none-any.whl", hash = "sha256:036d63ee35e7c8aedceda4f81c390a5102808af09ff3a6e57e27ed0be0708f3c"},
|
||||
{file = "google_generativeai-0.8.5-py3-none-any.whl", hash = "sha256:22b420817fb263f8ed520b33285f45976d5b21e904da32b80d4fd20c055123a2"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -750,8 +763,8 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "groq"
|
||||
version = "0.8.0"
|
||||
requires_python = ">=3.7"
|
||||
version = "0.22.0"
|
||||
requires_python = ">=3.8"
|
||||
summary = "The official Python library for the groq API"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
@ -760,11 +773,11 @@ dependencies = [
|
||||
"httpx<1,>=0.23.0",
|
||||
"pydantic<3,>=1.9.0",
|
||||
"sniffio",
|
||||
"typing-extensions<5,>=4.7",
|
||||
"typing-extensions<5,>=4.10",
|
||||
]
|
||||
files = [
|
||||
{file = "groq-0.8.0-py3-none-any.whl", hash = "sha256:f5e4e892d45001241a930db451e633ca1f0007e3f749deaa5d7360062fcd61e3"},
|
||||
{file = "groq-0.8.0.tar.gz", hash = "sha256:37ceb2f706bd516d0bfcac8e89048a24b375172987a0d6bd9efb521c54f6deff"},
|
||||
{file = "groq-0.22.0-py3-none-any.whl", hash = "sha256:f53d3966dff713aaa635671c2d075ebb932b0d48e3c4031ede9b84a2a6694c79"},
|
||||
{file = "groq-0.22.0.tar.gz", hash = "sha256:9d090fbe4a051655faff649890d18aaacb3121393ad9d55399171fe081f1057b"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -835,6 +848,9 @@ version = "0.14.0"
|
||||
requires_python = ">=3.7"
|
||||
summary = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"typing-extensions; python_version < \"3.8\"",
|
||||
]
|
||||
files = [
|
||||
{file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
|
||||
{file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
|
||||
@ -863,6 +879,7 @@ summary = "A comprehensive HTTP client library."
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2; python_version > \"3.0\"",
|
||||
"pyparsing<3,>=2.4.2; python_version < \"3.0\"",
|
||||
]
|
||||
files = [
|
||||
{file = "httplib2-0.22.0-py3-none-any.whl", hash = "sha256:14ae0a53c1ba8f3d37e9e27cf37eabb0fb9980f435ba405d546948b009dd64dc"},
|
||||
@ -943,6 +960,7 @@ requires_python = ">=3.8"
|
||||
summary = "Read metadata from Python packages"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"typing-extensions>=3.6.4; python_version < \"3.8\"",
|
||||
"zipp>=0.5",
|
||||
]
|
||||
files = [
|
||||
@ -1022,6 +1040,39 @@ files = [
|
||||
{file = "jiter-0.4.0.tar.gz", hash = "sha256:68203e02e0419bc3eca717c580c2d8f615aeee1150e2a1fb68d6600a7e52a37c"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema"
|
||||
version = "4.23.0"
|
||||
requires_python = ">=3.8"
|
||||
summary = "An implementation of JSON Schema validation for Python"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"attrs>=22.2.0",
|
||||
"importlib-resources>=1.4.0; python_version < \"3.9\"",
|
||||
"jsonschema-specifications>=2023.03.6",
|
||||
"pkgutil-resolve-name>=1.3.10; python_version < \"3.9\"",
|
||||
"referencing>=0.28.4",
|
||||
"rpds-py>=0.7.1",
|
||||
]
|
||||
files = [
|
||||
{file = "jsonschema-4.23.0-py3-none-any.whl", hash = "sha256:fbadb6f8b144a8f8cf9f0b89ba94501d143e50411a1278633f56a7acf7fd5566"},
|
||||
{file = "jsonschema-4.23.0.tar.gz", hash = "sha256:d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema-specifications"
|
||||
version = "2024.10.1"
|
||||
requires_python = ">=3.9"
|
||||
summary = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"referencing>=0.31.0",
|
||||
]
|
||||
files = [
|
||||
{file = "jsonschema_specifications-2024.10.1-py3-none-any.whl", hash = "sha256:a09a0680616357d9a0ecf05c12ad234479f549239d0f5b55f3deea67475da9bf"},
|
||||
{file = "jsonschema_specifications-2024.10.1.tar.gz", hash = "sha256:0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "langdetect"
|
||||
version = "1.0.9"
|
||||
@ -1036,24 +1087,26 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "litellm"
|
||||
version = "1.38.10"
|
||||
version = "1.67.0.post1"
|
||||
requires_python = "!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*,>=3.8"
|
||||
summary = "Library to easily interface with LLM API providers"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"aiohttp",
|
||||
"click",
|
||||
"httpx>=0.23.0",
|
||||
"importlib-metadata>=6.8.0",
|
||||
"jinja2<4.0.0,>=3.1.2",
|
||||
"openai>=1.27.0",
|
||||
"jsonschema<5.0.0,>=4.22.0",
|
||||
"openai>=1.68.2",
|
||||
"pydantic<3.0.0,>=2.0.0",
|
||||
"python-dotenv>=0.2.0",
|
||||
"requests<3.0.0,>=2.31.0",
|
||||
"tiktoken>=0.4.0",
|
||||
"tiktoken>=0.7.0",
|
||||
"tokenizers",
|
||||
]
|
||||
files = [
|
||||
{file = "litellm-1.38.10-py3-none-any.whl", hash = "sha256:4d33465eacde566832b9d7aa7677476e61aa7ba4ec26631fb1c8411c87219ed1"},
|
||||
{file = "litellm-1.38.10.tar.gz", hash = "sha256:1a0b3088fe4b072f367343a7d7d25e4c5f9990975d9ee7dbf21f3b25ff046bb0"},
|
||||
{file = "litellm-1.67.0.post1-py3-none-any.whl", hash = "sha256:b7b3c6a6a032b059a45b326673d24318dc8b65b1016a93194c9ea7ee94b0e00d"},
|
||||
{file = "litellm-1.67.0.post1.tar.gz", hash = "sha256:1adf69769ee5df93c834c093fad760f406feeb6c59e79638c3f448226887554d"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1322,22 +1375,23 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "openai"
|
||||
version = "1.30.3"
|
||||
requires_python = ">=3.7.1"
|
||||
version = "1.75.0"
|
||||
requires_python = ">=3.8"
|
||||
summary = "The official Python library for the openai API"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"anyio<5,>=3.5.0",
|
||||
"distro<2,>=1.7.0",
|
||||
"httpx<1,>=0.23.0",
|
||||
"jiter<1,>=0.4.0",
|
||||
"pydantic<3,>=1.9.0",
|
||||
"sniffio",
|
||||
"tqdm>4",
|
||||
"typing-extensions<5,>=4.7",
|
||||
"typing-extensions<5,>=4.11",
|
||||
]
|
||||
files = [
|
||||
{file = "openai-1.30.3-py3-none-any.whl", hash = "sha256:f88119c8a848998be533c71ab8aa832446fa72b7ddbc70917c3f5886dc132051"},
|
||||
{file = "openai-1.30.3.tar.gz", hash = "sha256:8e1bcdca2b96fe3636ab522fa153d88efde1b702d12ec32f1c73e9553ff93f45"},
|
||||
{file = "openai-1.75.0-py3-none-any.whl", hash = "sha256:fe6f932d2ded3b429ff67cc9ad118c71327db32eb9d32dd723de3acfca337125"},
|
||||
{file = "openai-1.75.0.tar.gz", hash = "sha256:fb3ea907efbdb1bcfd0c44507ad9c961afd7dce3147292b54505ecfd17be8fd1"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1351,18 +1405,29 @@ files = [
|
||||
{file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "promptdown"
|
||||
version = "0.9.0"
|
||||
requires_python = ">=3.10"
|
||||
summary = "A package for loading promptdown files, which are a special type of markdown file for defining structured LLM prompts"
|
||||
groups = ["default"]
|
||||
files = [
|
||||
{file = "promptdown-0.9.0-py3-none-any.whl", hash = "sha256:9ebd7044517217d00f61966dfe8297ee06328d11a6ca52d1b48c96739e5fc01a"},
|
||||
{file = "promptdown-0.9.0.tar.gz", hash = "sha256:5727cf275a62f0feb6754fec4182b4a240a7e2bd2615e2381498d75d386c4087"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proto-plus"
|
||||
version = "1.23.0"
|
||||
requires_python = ">=3.6"
|
||||
summary = "Beautiful, Pythonic protocol buffers."
|
||||
version = "1.26.1"
|
||||
requires_python = ">=3.7"
|
||||
summary = "Beautiful, Pythonic protocol buffers"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"protobuf<5.0.0dev,>=3.19.0",
|
||||
"protobuf<7.0.0,>=3.19.0",
|
||||
]
|
||||
files = [
|
||||
{file = "proto-plus-1.23.0.tar.gz", hash = "sha256:89075171ef11988b3fa157f5dbd8b9cf09d65fffee97e29ce403cd8defba19d2"},
|
||||
{file = "proto_plus-1.23.0-py3-none-any.whl", hash = "sha256:a829c79e619e1cf632de091013a4173deed13a55f326ef84f05af6f50ff4c82c"},
|
||||
{file = "proto_plus-1.26.1-py3-none-any.whl", hash = "sha256:13285478c2dcf2abb829db158e1047e2f1e8d63a077d94263c2b88b043c75a66"},
|
||||
{file = "proto_plus-1.26.1.tar.gz", hash = "sha256:21a515a4c4c0088a773899e23c7bbade3d18f9c66c73edd4c7ee3816bc96a012"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1603,6 +1668,22 @@ files = [
|
||||
{file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "referencing"
|
||||
version = "0.36.2"
|
||||
requires_python = ">=3.9"
|
||||
summary = "JSON Referencing + Python"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"attrs>=22.2.0",
|
||||
"rpds-py>=0.7.0",
|
||||
"typing-extensions>=4.4.0; python_version < \"3.13\"",
|
||||
]
|
||||
files = [
|
||||
{file = "referencing-0.36.2-py3-none-any.whl", hash = "sha256:e8699adbbf8b5c7de96d8ffa0eb5c158b3beafce084968e2ea8bb08c6794dcd0"},
|
||||
{file = "referencing-0.36.2.tar.gz", hash = "sha256:df2e89862cd09deabbdba16944cc3f10feb6b3e6f18e902f7cc25609a34775aa"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "2024.4.28"
|
||||
@ -1677,7 +1758,7 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "requests"
|
||||
version = "2.32.2"
|
||||
version = "2.32.3"
|
||||
requires_python = ">=3.8"
|
||||
summary = "Python HTTP for Humans."
|
||||
groups = ["default"]
|
||||
@ -1688,23 +1769,122 @@ dependencies = [
|
||||
"urllib3<3,>=1.21.1",
|
||||
]
|
||||
files = [
|
||||
{file = "requests-2.32.2-py3-none-any.whl", hash = "sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"},
|
||||
{file = "requests-2.32.2.tar.gz", hash = "sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289"},
|
||||
{file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"},
|
||||
{file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rich"
|
||||
version = "13.7.1"
|
||||
requires_python = ">=3.7.0"
|
||||
version = "14.0.0"
|
||||
requires_python = ">=3.8.0"
|
||||
summary = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
"markdown-it-py>=2.2.0",
|
||||
"pygments<3.0.0,>=2.13.0",
|
||||
"typing-extensions<5.0,>=4.0.0; python_version < \"3.11\"",
|
||||
]
|
||||
files = [
|
||||
{file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"},
|
||||
{file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"},
|
||||
{file = "rich-14.0.0-py3-none-any.whl", hash = "sha256:1c9491e1951aac09caffd42f448ee3d04e58923ffe14993f6e83068dc395d7e0"},
|
||||
{file = "rich-14.0.0.tar.gz", hash = "sha256:82f1bc23a6a21ebca4ae0c45af9bdbc492ed20231dcb63f297d6d1021a9d5725"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rpds-py"
|
||||
version = "0.24.0"
|
||||
requires_python = ">=3.9"
|
||||
summary = "Python bindings to Rust's persistent data structures (rpds)"
|
||||
groups = ["default"]
|
||||
files = [
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:006f4342fe729a368c6df36578d7a348c7c716be1da0a1a0f86e3021f8e98724"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2d53747da70a4e4b17f559569d5f9506420966083a31c5fbd84e764461c4444b"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8acd55bd5b071156bae57b555f5d33697998752673b9de554dd82f5b5352727"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7e80d375134ddb04231a53800503752093dbb65dad8dabacce2c84cccc78e964"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:60748789e028d2a46fc1c70750454f83c6bdd0d05db50f5ae83e2db500b34da5"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6e1daf5bf6c2be39654beae83ee6b9a12347cb5aced9a29eecf12a2d25fff664"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1b221c2457d92a1fb3c97bee9095c874144d196f47c038462ae6e4a14436f7bc"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:66420986c9afff67ef0c5d1e4cdc2d0e5262f53ad11e4f90e5e22448df485bf0"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:43dba99f00f1d37b2a0265a259592d05fcc8e7c19d140fe51c6e6f16faabeb1f"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:a88c0d17d039333a41d9bf4616bd062f0bd7aa0edeb6cafe00a2fc2a804e944f"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc31e13ce212e14a539d430428cd365e74f8b2d534f8bc22dd4c9c55b277b875"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-win32.whl", hash = "sha256:fc2c1e1b00f88317d9de6b2c2b39b012ebbfe35fe5e7bef980fd2a91f6100a07"},
|
||||
{file = "rpds_py-0.24.0-cp310-cp310-win_amd64.whl", hash = "sha256:c0145295ca415668420ad142ee42189f78d27af806fcf1f32a18e51d47dd2052"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2d3ee4615df36ab8eb16c2507b11e764dcc11fd350bbf4da16d09cda11fcedef"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e13ae74a8a3a0c2f22f450f773e35f893484fcfacb00bb4344a7e0f4f48e1f97"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf86f72d705fc2ef776bb7dd9e5fbba79d7e1f3e258bf9377f8204ad0fc1c51e"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c43583ea8517ed2e780a345dd9960896afc1327e8cf3ac8239c167530397440d"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4cd031e63bc5f05bdcda120646a0d32f6d729486d0067f09d79c8db5368f4586"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:34d90ad8c045df9a4259c47d2e16a3f21fdb396665c94520dbfe8766e62187a4"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e838bf2bb0b91ee67bf2b889a1a841e5ecac06dd7a2b1ef4e6151e2ce155c7ae"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04ecf5c1ff4d589987b4d9882872f80ba13da7d42427234fce8f22efb43133bc"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:630d3d8ea77eabd6cbcd2ea712e1c5cecb5b558d39547ac988351195db433f6c"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:ebcb786b9ff30b994d5969213a8430cbb984cdd7ea9fd6df06663194bd3c450c"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:174e46569968ddbbeb8a806d9922f17cd2b524aa753b468f35b97ff9c19cb718"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-win32.whl", hash = "sha256:5ef877fa3bbfb40b388a5ae1cb00636a624690dcb9a29a65267054c9ea86d88a"},
|
||||
{file = "rpds_py-0.24.0-cp311-cp311-win_amd64.whl", hash = "sha256:e274f62cbd274359eff63e5c7e7274c913e8e09620f6a57aae66744b3df046d6"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:d8551e733626afec514b5d15befabea0dd70a343a9f23322860c4f16a9430205"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0e374c0ce0ca82e5b67cd61fb964077d40ec177dd2c4eda67dba130de09085c7"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d69d003296df4840bd445a5d15fa5b6ff6ac40496f956a221c4d1f6f7b4bc4d9"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8212ff58ac6dfde49946bea57474a386cca3f7706fc72c25b772b9ca4af6b79e"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:528927e63a70b4d5f3f5ccc1fa988a35456eb5d15f804d276709c33fc2f19bda"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a824d2c7a703ba6daaca848f9c3d5cb93af0505be505de70e7e66829affd676e"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44d51febb7a114293ffd56c6cf4736cb31cd68c0fddd6aa303ed09ea5a48e029"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3fab5f4a2c64a8fb64fc13b3d139848817a64d467dd6ed60dcdd6b479e7febc9"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9be4f99bee42ac107870c61dfdb294d912bf81c3c6d45538aad7aecab468b6b7"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:564c96b6076a98215af52f55efa90d8419cc2ef45d99e314fddefe816bc24f91"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:75a810b7664c17f24bf2ffd7f92416c00ec84b49bb68e6a0d93e542406336b56"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-win32.whl", hash = "sha256:f6016bd950be4dcd047b7475fdf55fb1e1f59fc7403f387be0e8123e4a576d30"},
|
||||
{file = "rpds_py-0.24.0-cp312-cp312-win_amd64.whl", hash = "sha256:998c01b8e71cf051c28f5d6f1187abbdf5cf45fc0efce5da6c06447cba997034"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3d2d8e4508e15fc05b31285c4b00ddf2e0eb94259c2dc896771966a163122a0c"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f00c16e089282ad68a3820fd0c831c35d3194b7cdc31d6e469511d9bffc535c"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:951cc481c0c395c4a08639a469d53b7d4afa252529a085418b82a6b43c45c240"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9ca89938dff18828a328af41ffdf3902405a19f4131c88e22e776a8e228c5a8"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed0ef550042a8dbcd657dfb284a8ee00f0ba269d3f2286b0493b15a5694f9fe8"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b2356688e5d958c4d5cb964af865bea84db29971d3e563fb78e46e20fe1848b"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78884d155fd15d9f64f5d6124b486f3d3f7fd7cd71a78e9670a0f6f6ca06fb2d"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6a4a535013aeeef13c5532f802708cecae8d66c282babb5cd916379b72110cf7"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:84e0566f15cf4d769dade9b366b7b87c959be472c92dffb70462dd0844d7cbad"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:823e74ab6fbaa028ec89615ff6acb409e90ff45580c45920d4dfdddb069f2120"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c61a2cb0085c8783906b2f8b1f16a7e65777823c7f4d0a6aaffe26dc0d358dd9"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-win32.whl", hash = "sha256:60d9b630c8025b9458a9d114e3af579a2c54bd32df601c4581bd054e85258143"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313-win_amd64.whl", hash = "sha256:6eea559077d29486c68218178ea946263b87f1c41ae7f996b1f30a983c476a5a"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:d09dc82af2d3c17e7dd17120b202a79b578d79f2b5424bda209d9966efeed114"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5fc13b44de6419d1e7a7e592a4885b323fbc2f46e1f22151e3a8ed3b8b920405"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c347a20d79cedc0a7bd51c4d4b7dbc613ca4e65a756b5c3e57ec84bd43505b47"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:20f2712bd1cc26a3cc16c5a1bfee9ed1abc33d4cdf1aabd297fe0eb724df4272"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aad911555286884be1e427ef0dc0ba3929e6821cbeca2194b13dc415a462c7fd"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0aeb3329c1721c43c58cae274d7d2ca85c1690d89485d9c63a006cb79a85771a"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2a0f156e9509cee987283abd2296ec816225145a13ed0391df8f71bf1d789e2d"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:aa6800adc8204ce898c8a424303969b7aa6a5e4ad2789c13f8648739830323b7"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a18fc371e900a21d7392517c6f60fe859e802547309e94313cd8181ad9db004d"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9168764133fd919f8dcca2ead66de0105f4ef5659cbb4fa044f7014bed9a1797"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:5f6e3cec44ba05ee5cbdebe92d052f69b63ae792e7d05f1020ac5e964394080c"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-win32.whl", hash = "sha256:8ebc7e65ca4b111d928b669713865f021b7773350eeac4a31d3e70144297baba"},
|
||||
{file = "rpds_py-0.24.0-cp313-cp313t-win_amd64.whl", hash = "sha256:675269d407a257b8c00a6b58205b72eec8231656506c56fd429d924ca00bb350"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:619ca56a5468f933d940e1bf431c6f4e13bef8e688698b067ae68eb4f9b30e3a"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:4b28e5122829181de1898c2c97f81c0b3246d49f585f22743a1246420bb8d399"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8e5ab32cf9eb3647450bc74eb201b27c185d3857276162c101c0f8c6374e098"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:208b3a70a98cf3710e97cabdc308a51cd4f28aa6e7bb11de3d56cd8b74bab98d"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bbc4362e06f950c62cad3d4abf1191021b2ffaf0b31ac230fbf0526453eee75e"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ebea2821cdb5f9fef44933617be76185b80150632736f3d76e54829ab4a3b4d1"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4df06c35465ef4d81799999bba810c68d29972bf1c31db61bfdb81dd9d5bb"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d3aa13bdf38630da298f2e0d77aca967b200b8cc1473ea05248f6c5e9c9bdb44"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:041f00419e1da7a03c46042453598479f45be3d787eb837af382bfc169c0db33"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl", hash = "sha256:d8754d872a5dfc3c5bf9c0e059e8107451364a30d9fd50f1f1a85c4fb9481164"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:896c41007931217a343eff197c34513c154267636c8056fb409eafd494c3dcdc"},
|
||||
{file = "rpds_py-0.24.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:92558d37d872e808944c3c96d0423b8604879a3d1c86fdad508d7ed91ea547d5"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f9e0057a509e096e47c87f753136c9b10d7a91842d8042c2ee6866899a717c0d"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d6e109a454412ab82979c5b1b3aee0604eca4bbf9a02693bb9df027af2bfa91a"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc1c892b1ec1f8cbd5da8de287577b455e388d9c328ad592eabbdcb6fc93bee5"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9c39438c55983d48f4bb3487734d040e22dad200dab22c41e331cee145e7a50d"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d7e8ce990ae17dda686f7e82fd41a055c668e13ddcf058e7fb5e9da20b57793"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9ea7f4174d2e4194289cb0c4e172d83e79a6404297ff95f2875cf9ac9bced8ba"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb2954155bb8f63bb19d56d80e5e5320b61d71084617ed89efedb861a684baea"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04f2b712a2206e13800a8136b07aaedc23af3facab84918e7aa89e4be0260032"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:eda5c1e2a715a4cbbca2d6d304988460942551e4e5e3b7457b50943cd741626d"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:9abc80fe8c1f87218db116016de575a7998ab1629078c90840e8d11ab423ee25"},
|
||||
{file = "rpds_py-0.24.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:6a727fd083009bc83eb83d6950f0c32b3c94c8b80a9b667c87f4bd1274ca30ba"},
|
||||
{file = "rpds_py-0.24.0.tar.gz", hash = "sha256:772cc1b2cd963e7e17e6cc55fe0371fb9c704d63e44cacec7b9b7f523b78919e"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1767,8 +1947,8 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "tiktoken"
|
||||
version = "0.7.0"
|
||||
requires_python = ">=3.8"
|
||||
version = "0.9.0"
|
||||
requires_python = ">=3.9"
|
||||
summary = "tiktoken is a fast BPE tokeniser for use with OpenAI's models"
|
||||
groups = ["default"]
|
||||
dependencies = [
|
||||
@ -1776,35 +1956,31 @@ dependencies = [
|
||||
"requests>=2.26.0",
|
||||
]
|
||||
files = [
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485f3cc6aba7c6b6ce388ba634fbba656d9ee27f766216f45146beb4ac18b25f"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e54be9a2cd2f6d6ffa3517b064983fb695c9a9d8aa7d574d1ef3c3f931a99225"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:79383a6e2c654c6040e5f8506f3750db9ddd71b550c724e673203b4f6b4b4590"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d4511c52caacf3c4981d1ae2df85908bd31853f33d30b345c8b6830763f769c"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13c94efacdd3de9aff824a788353aa5749c0faee1fbe3816df365ea450b82311"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8e58c7eb29d2ab35a7a8929cbeea60216a4ccdf42efa8974d8e176d50c9a3df5"},
|
||||
{file = "tiktoken-0.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:21a20c3bd1dd3e55b91c1331bf25f4af522c525e771691adbc9a69336fa7f702"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:10c7674f81e6e350fcbed7c09a65bca9356eaab27fb2dac65a1e440f2bcfe30f"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:084cec29713bc9d4189a937f8a35dbdfa785bd1235a34c1124fe2323821ee93f"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:811229fde1652fedcca7c6dfe76724d0908775b353556d8a71ed74d866f73f7b"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86b6e7dc2e7ad1b3757e8a24597415bafcfb454cebf9a33a01f2e6ba2e663992"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1063c5748be36344c7e18c7913c53e2cca116764c2080177e57d62c7ad4576d1"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:20295d21419bfcca092644f7e2f2138ff947a6eb8cfc732c09cc7d76988d4a89"},
|
||||
{file = "tiktoken-0.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:959d993749b083acc57a317cbc643fb85c014d055b2119b739487288f4e5d1cb"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:71c55d066388c55a9c00f61d2c456a6086673ab7dec22dd739c23f77195b1908"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:09ed925bccaa8043e34c519fbb2f99110bd07c6fd67714793c21ac298e449410"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03c6c40ff1db0f48a7b4d2dafeae73a5607aacb472fa11f125e7baf9dce73704"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d20b5c6af30e621b4aca094ee61777a44118f52d886dbe4f02b70dfe05c15350"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d427614c3e074004efa2f2411e16c826f9df427d3c70a54725cae860f09e4bf4"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8c46d7af7b8c6987fac9b9f61041b452afe92eb087d29c9ce54951280f899a97"},
|
||||
{file = "tiktoken-0.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:0bc603c30b9e371e7c4c7935aba02af5994a909fc3c0fe66e7004070858d3f8f"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cabc6dc77460df44ec5b879e68692c63551ae4fae7460dd4ff17181df75f1db7"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8d57f29171255f74c0aeacd0651e29aa47dff6f070cb9f35ebc14c82278f3b25"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2ee92776fdbb3efa02a83f968c19d4997a55c8e9ce7be821ceee04a1d1ee149c"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e215292e99cb41fbc96988ef62ea63bb0ce1e15f2c147a61acc319f8b4cbe5bf"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:8a81bac94769cab437dd3ab0b8a4bc4e0f9cf6835bcaa88de71f39af1791727a"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d6d73ea93e91d5ca771256dfc9d1d29f5a554b83821a1dc0891987636e0ae226"},
|
||||
{file = "tiktoken-0.7.0-cp39-cp39-win_amd64.whl", hash = "sha256:2bcb28ddf79ffa424f171dfeef9a4daff61a94c631ca6813f43967cb263b83b9"},
|
||||
{file = "tiktoken-0.7.0.tar.gz", hash = "sha256:1077266e949c24e0291f6c350433c6f0971365ece2b173a23bc3b9f9defef6b6"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:586c16358138b96ea804c034b8acf3f5d3f0258bd2bc3b0227af4af5d622e382"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d9c59ccc528c6c5dd51820b3474402f69d9a9e1d656226848ad68a8d5b2e5108"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f0968d5beeafbca2a72c595e8385a1a1f8af58feaebb02b227229b69ca5357fd"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:92a5fb085a6a3b7350b8fc838baf493317ca0e17bd95e8642f95fc69ecfed1de"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:15a2752dea63d93b0332fb0ddb05dd909371ededa145fe6a3242f46724fa7990"},
|
||||
{file = "tiktoken-0.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:26113fec3bd7a352e4b33dbaf1bd8948de2507e30bd95a44e2b1156647bc01b4"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f32cc56168eac4851109e9b5d327637f15fd662aa30dd79f964b7c39fbadd26e"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:45556bc41241e5294063508caf901bf92ba52d8ef9222023f83d2483a3055348"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:03935988a91d6d3216e2ec7c645afbb3d870b37bcb67ada1943ec48678e7ee33"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b3d80aad8d2c6b9238fc1a5524542087c52b860b10cbf952429ffb714bc1136"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b2a21133be05dc116b1d0372af051cd2c6aa1d2188250c9b553f9fa49301b336"},
|
||||
{file = "tiktoken-0.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:11a20e67fdf58b0e2dea7b8654a288e481bb4fc0289d3ad21291f8d0849915fb"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:e88f121c1c22b726649ce67c089b90ddda8b9662545a8aeb03cfef15967ddd03"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a6600660f2f72369acb13a57fb3e212434ed38b045fd8cc6cdd74947b4b5d210"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95e811743b5dfa74f4b227927ed86cbc57cad4df859cb3b643be797914e41794"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99376e1370d59bcf6935c933cb9ba64adc29033b7e73f5f7569f3aad86552b22"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:badb947c32739fb6ddde173e14885fb3de4d32ab9d8c591cbd013c22b4c31dd2"},
|
||||
{file = "tiktoken-0.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:5a62d7a25225bafed786a524c1b9f0910a1128f4232615bf3f8257a73aaa3b16"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b0e8e05a26eda1249e824156d537015480af7ae222ccb798e5234ae0285dbdb"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:27d457f096f87685195eea0165a1807fae87b97b2161fe8c9b1df5bd74ca6f63"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cf8ded49cddf825390e36dd1ad35cd49589e8161fdcb52aa25f0583e90a3e01"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc156cb314119a8bb9748257a2eaebd5cc0753b6cb491d26694ed42fc7cb3139"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:cd69372e8c9dd761f0ab873112aba55a0e3e506332dd9f7522ca466e817b1b7a"},
|
||||
{file = "tiktoken-0.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:5ea0edb6f83dc56d794723286215918c1cde03712cbbafa0348b33448faf5b95"},
|
||||
{file = "tiktoken-0.9.0.tar.gz", hash = "sha256:d02a5ca6a938e0490e1ff957bc48c8b078c88cb83977be1625b1fd8aac792c5d"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1897,7 +2073,7 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "tqdm"
|
||||
version = "4.66.4"
|
||||
version = "4.67.1"
|
||||
requires_python = ">=3.7"
|
||||
summary = "Fast, Extensible Progress Meter"
|
||||
groups = ["default"]
|
||||
@ -1905,8 +2081,8 @@ dependencies = [
|
||||
"colorama; platform_system == \"Windows\"",
|
||||
]
|
||||
files = [
|
||||
{file = "tqdm-4.66.4-py3-none-any.whl", hash = "sha256:b75ca56b413b030bc3f00af51fd2c1a1a5eac6a0c1cca83cbb37a5c52abce644"},
|
||||
{file = "tqdm-4.66.4.tar.gz", hash = "sha256:e4d936c9de8727928f3be6079590e97d9abfe8d39a590be678eb5919ffc186bb"},
|
||||
{file = "tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2"},
|
||||
{file = "tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1951,6 +2127,7 @@ groups = ["default"]
|
||||
dependencies = [
|
||||
"idna>=2.0",
|
||||
"multidict>=4.0",
|
||||
"typing-extensions>=3.7.4; python_version < \"3.8\"",
|
||||
]
|
||||
files = [
|
||||
{file = "yarl-1.9.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a8c1df72eb746f4136fe9a2e72b0c9dc1da1cbd23b5372f94b5820ff8ae30e0e"},
|
||||
|
11
prompt_md.prompt.md
Normal file
11
prompt_md.prompt.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Translation Prompt
|
||||
|
||||
## Developer Message
|
||||
|
||||
You are a professional translator who specializes in accurate, natural-sounding translations that preserve the original meaning, tone, and style of the text.
|
||||
|
||||
## Conversation
|
||||
|
||||
| Role | Content |
|
||||
|-------|---------------------------------------------------------------------------|
|
||||
| User | Please translate the following text into {language}:\n\n{text} |
|
@ -4,7 +4,7 @@ description = "The bilingual_book_maker is an AI translation tool that uses Chat
|
||||
readme = "README.md"
|
||||
license = {text = "MIT"}
|
||||
dynamic = ["version"]
|
||||
requires-python = ">=3.9"
|
||||
requires-python = ">=3.10"
|
||||
authors = [
|
||||
{ name = "yihong0618", email = "zouzou0208@gmail.com" },
|
||||
]
|
||||
@ -28,10 +28,12 @@ dependencies = [
|
||||
"tiktoken",
|
||||
"tqdm",
|
||||
"groq>=0.5.0",
|
||||
"promptdown>=0.9.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
bbook_maker = "book_maker.cli:main"
|
||||
promptdown = "promptdown_cli:main"
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/yihong0618/bilingual_book_maker"
|
||||
|
@ -53,6 +53,7 @@ mdurl==0.1.2
|
||||
multidict==6.0.5
|
||||
openai==1.30.3
|
||||
packaging==24.0
|
||||
promptdown==0.9.0
|
||||
proto-plus==1.23.0
|
||||
protobuf==4.25.3
|
||||
pyasn1==0.6.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user