Initial commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"translation": {
|
||||
"chunk_size": 5000,
|
||||
"temperature": 0.3,
|
||||
"glossary": {
|
||||
"enabled": true,
|
||||
"auto_generate": true,
|
||||
"sample_size": 3000
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"output_dir": "output",
|
||||
"filename_suffix": "_bilingual"
|
||||
},
|
||||
"logging": {
|
||||
"level": "INFO",
|
||||
"file": "logs/translator.log",
|
||||
"rotation": "10 MB",
|
||||
"retention": "7 days"
|
||||
},
|
||||
"providers": {
|
||||
"openrouter": {
|
||||
"base_url": "https://openrouter.ai/api/v1",
|
||||
"api_key": "YOUR_OPENROUTER_API_KEY",
|
||||
"models": {
|
||||
"fast": "google/gemini-2.0-flash-001",
|
||||
"smart": "google/gemini-2.0-flash-thinking-exp:free"
|
||||
},
|
||||
"extra_headers": {
|
||||
"HTTP-Referer": "https://github.com/epub-translator",
|
||||
"X-Title": "EPUB Translator"
|
||||
},
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 60,
|
||||
"concurrent_requests": 32
|
||||
}
|
||||
},
|
||||
"v3": {
|
||||
"base_url": "https://api.gpt.ge/v1",
|
||||
"api_key": "YOUR_V3_API_KEY",
|
||||
"models": {
|
||||
"fast": "gpt-4o-mini",
|
||||
"smart": "gpt-4o"
|
||||
},
|
||||
"extra_headers": {
|
||||
"x-foo": "true"
|
||||
},
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 500,
|
||||
"concurrent_requests": 50
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"translation": {
|
||||
"chunk_size": 5000,
|
||||
"temperature": 0.3,
|
||||
"glossary": {
|
||||
"enabled": true,
|
||||
"auto_generate": true,
|
||||
"sample_size": 3000
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"output_dir": "output",
|
||||
"filename_suffix": "_bilingual"
|
||||
},
|
||||
"logging": {
|
||||
"level": "INFO",
|
||||
"file": "logs/translator.log",
|
||||
"rotation": "10 MB",
|
||||
"retention": "7 days"
|
||||
},
|
||||
"providers": {
|
||||
"openrouter": {
|
||||
"base_url": "https://openrouter.ai/api/v1",
|
||||
"api_key": "YOUR_OPENROUTER_API_KEY",
|
||||
"models": {
|
||||
"fast": "google/gemini-2.0-flash-001",
|
||||
"smart": "google/gemini-2.0-flash-thinking-exp:free"
|
||||
},
|
||||
"extra_headers": {
|
||||
"HTTP-Referer": "https://github.com/epub-translator",
|
||||
"X-Title": "EPUB Translator"
|
||||
},
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 60,
|
||||
"concurrent_requests": 32
|
||||
}
|
||||
},
|
||||
"v3": {
|
||||
"base_url": "https://api.gpt.ge/v1",
|
||||
"api_key": "YOUR_V3_API_KEY",
|
||||
"models": {
|
||||
"fast": "gemini-3-flash-preview",
|
||||
"smart": "gemini-3-pro-preview"
|
||||
},
|
||||
"extra_headers": {
|
||||
"x-foo": "true"
|
||||
},
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 500,
|
||||
"concurrent_requests": 50
|
||||
}
|
||||
},
|
||||
"openai": {
|
||||
"base_url": "http://127.0.0.1:8045/v1",
|
||||
"api_key": "YOUR_ANTIGRAVITY_API_KEY",
|
||||
"models": {
|
||||
"fast": "gemini-3-flash",
|
||||
"smart": "gemini-3-pro-high"
|
||||
},
|
||||
"extra_headers": {
|
||||
"x-foo": "true"
|
||||
},
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 500,
|
||||
"concurrent_requests": 50
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"llm": {
|
||||
"provider": "openrouter",
|
||||
"base_url": "https://openrouter.ai/api/v1",
|
||||
"api_key": "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",
|
||||
"models": {
|
||||
"fast": "google/gemini-3-flash-preview",
|
||||
"smart": "google/gemini-3-pro-preview"
|
||||
},
|
||||
"arena_models": [
|
||||
"google/gemini-3-flash-preview",
|
||||
"openai/gpt-5-mini",
|
||||
"anthropic/claude-haiku-4.5"
|
||||
],
|
||||
"judge_model": "openai/gpt-5.1",
|
||||
"rate_limits": {
|
||||
"requests_per_minute": 60,
|
||||
"concurrent_requests": 32
|
||||
}
|
||||
},
|
||||
"translation": {
|
||||
"chunk_size": 5000,
|
||||
"temperature": 0.3,
|
||||
"strategy": "arena_winner"
|
||||
},
|
||||
"processing": {
|
||||
"min_paragraph_length": 5
|
||||
},
|
||||
"output": {
|
||||
"output_dir": "output",
|
||||
"filename_suffix": "_bilingual"
|
||||
},
|
||||
"logging": {
|
||||
"level": "INFO",
|
||||
"file": "logs/translator.log",
|
||||
"rotation": "10 MB",
|
||||
"retention": "7 days"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"translation": {
|
||||
"system": "你是一位精通中英文的专业翻译家。你的任务是翻译书籍内容。\n\n要求:\n1. 准确传达原文含义,语言流畅自然,符合中文阅读习惯。\n2. 严格保持【p_xxxxx】编号格式,不要遗漏,不要修改编号。\n3. 不要添加任何解释、注释或无关内容,只返回【编号】+【译文】。\n\n{{glossary_instruction}}",
|
||||
"user_template": "请翻译以下段落:\n\n{{content}}"
|
||||
},
|
||||
"glossary_extraction": {
|
||||
"system": "你是一位资深的文学编辑和领域专家。你的任务是分析书籍样本,提取关键术语并制定统一的译名表。",
|
||||
"user_template": "请阅读以下书籍片段(包含前言和正文采样)。\n\n任务:\n1. 识别文中出现的人名(如 'Masa', 'Steve Jobs')、地名、机构名。\n2. 识别特定的行业术语或关键概念。\n3. 为上述词汇提供标准的中文译名。如果像 'Masa' 这样的昵称有对应的全名(如孙正义),请务必使用全名。\n\n请以 JSON 格式输出,格式如下:\n{\n \"Masa\": \"孙正义\",\n \"Apple\": \"苹果公司\",\n ...\n}\n\n书籍片段:\n\n{{content}}"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user