Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

refactor(webui): centralize provider tips and defaults

harry0703c93afb006b7e
diff --git a/README-ar.md b/README-ar.md
index 9cd3cbbe..a4941eb8 100644
--- a/README-ar.md
+++ b/README-ar.md
@@ -41,7 +41,7 @@
- [x] يدعم **توليد الترجمة**، مع إمكانية ضبط `الخط` و`الموضع` و`اللون` و`الحجم`، كما يدعم `تحديد إطار الترجمة`
- [x] يدعم **موسيقى الخلفية**، إما عشوائية أو ملفات موسيقى محدّدة، مع إمكانية ضبط `مستوى صوت موسيقى الخلفية`
- [x] مصادر مواد الفيديو **عالية الدقة** و**خالية من حقوق الملكية**، كما يمكنك استخدام **موادك المحلية** الخاصة
-- [x] يدعم التكامل مع نماذج متعددة مثل **OpenAI** و**Moonshot** و**Azure** و**gpt4free** و**one-api** و**Qwen** و**Google Gemini** و**Ollama** و**DeepSeek** و**MiniMax** و**ERNIE** و**Pollinations** و**ModelScope** وغيرها
+- [x] يدعم التكامل مع نماذج متعددة مثل **OpenAI** و**Moonshot** و**Azure** و**one-api** و**Qwen** و**Google Gemini** و**Ollama** و**DeepSeek** و**MiniMax** و**ERNIE** و**Pollinations** و**ModelScope** وغيرها
## عروض فيديو توضيحية 📺
diff --git a/README-en.md b/README-en.md
index b82b8313..d8b06e89 100644
--- a/README-en.md
+++ b/README-en.md
@@ -29,6 +29,15 @@ materials, video subtitles, and video background music before synthesizing a hig
## Special Thanks 🙏
+<div align="center">
+ <a href="https://platform.kimi.ai?aff=MoneyPrinterTurbo" target="_blank"><img src="https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-en.png" alt="Kimi sponsors MoneyPrinterTurbo" width="100%"></a>
+</div>
+
+Thanks to [Kimi](https://platform.kimi.ai?aff=MoneyPrinterTurbo) for sponsoring this project! [Kimi K2.7 Code](https://platform.kimi.ai/docs/guide/kimi-k2-7-code-quickstart) is an open-source, coding-focused agentic model developed by Moonshot AI, with substantial gains on real-world long-horizon coding tasks and higher end-to-end success across complex software engineering workflows. It also cuts thinking-token usage by approximately 30% compared with K2.6. Within MoneyPrinterTurbo, Kimi's LLM powers video creation: it writes the video script and extracts the search keywords that decide the final footage, so the sharper its understanding, the more on-topic the results.
+
+**MoneyPrinterTurbo already supports Kimi. Visit the [Kimi Open Platform](https://platform.kimi.ai?aff=MoneyPrinterTurbo) ([中文站](https://platform.kimi.com?aff=MoneyPrinterTurbo) | [Global](https://platform.kimi.ai?aff=MoneyPrinterTurbo)) to try the API, or explore the cost-effective [Coding Plan](https://www.kimi.com/code?aff=MoneyPrinterTurbo).**
+
+<br>
<table align="center">
<tr>
<td align="center" width="160">
@@ -105,7 +114,7 @@ materials, video subtitles, and video background music before synthesizing a hig
- [x] Video material sources are **high-definition** and **royalty-free**, and you can also use your own **local materials**
- [x] Supports multiple stock video providers: **Pexels**, **Pixabay**, and **Coverr**
- [x] Optional **TwelveLabs** video AI integration: use **Marengo** embeddings to semantically rank B-roll search terms against your subject, and **Pegasus** to QA/describe clips ([TwelveLabs API key](https://twelvelabs.io))
-- [x] Supports integration with various models such as **OpenAI**, **AIHubMix**, **AIML API**, **EvoLink**, **Moonshot**, **Azure**, **gpt4free**, **one-api**, **Qwen**, **Google Gemini**, **Ollama**, **DeepSeek**, **MiniMax**, **ERNIE**, **Pollinations**, **ModelScope** and more
+- [x] Supports integration with various models such as **Kimi/Moonshot**, **OpenAI**, **AIHubMix**, **AIML API**, **EvoLink**, **Azure**, **one-api**, **Qwen**, **Google Gemini**, **Ollama**, **DeepSeek**, **MiniMax**, **ERNIE**, **Pollinations**, **ModelScope** and more
## Video Demos 📺
diff --git a/README.md b/README.md
index faf3267c..aa5b673c 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,6 @@
<a href="https://trendshift.io/repositories/8731" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8731" alt="harry0703%2FMoneyPrinterTurbo | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
-<br>
只需提供一个视频 <b>主题</b> 或 <b>关键词</b> ,就可以全自动生成视频文案、视频素材、视频字幕、视频背景音乐,然后合成一个高清的短视频。
<br>
@@ -29,6 +28,15 @@
## 特别感谢 🙏
+<div align="center">
+ <a href="https://platform.kimi.com?aff=MoneyPrinterTurbo" target="_blank"><img src="https://gcdn.moonshot.cn/growth-cdn/sponsor/kimi-zh.png" alt="Kimi 赞助 MoneyPrinterTurbo" width="100%"></a>
+</div>
+
+感谢 [Kimi](https://platform.kimi.com?aff=MoneyPrinterTurbo) 赞助本项目![Kimi K2.7 Code](https://platform.kimi.com/docs/guide/kimi-k2-7-code-quickstart) 是 Moonshot AI 推出的编程专用开源智能体模型,在真实长程编程与复杂软件工程工作流中显著提升端到端任务成功率,同时优化推理效率,相比 K2.6 平均减少约 30% 的推理 token 消耗。而在本项目中,Kimi 大模型能直接驱动视频创作,不仅撰写视频文案,还会提炼素材搜索关键词、决定成片画面,文案理解越精准,匹配到的素材就越贴题。
+
+**本项目已接入 Kimi 大模型。前往 [Kimi 开放平台](https://platform.kimi.com?aff=MoneyPrinterTurbo)([中文站](https://platform.kimi.com?aff=MoneyPrinterTurbo)|[Global](https://platform.kimi.ai?aff=MoneyPrinterTurbo))体验 API,或了解高性价比 [Coding Plan 套餐](https://www.kimi.com/code?aff=MoneyPrinterTurbo)。**
+<br>
+
<table align="center">
<tr>
<td align="center" width="160">
@@ -102,7 +110,7 @@
- [x] 视频素材来源 **高清**,而且 **无版权**,也可以使用自己的 **本地素材**
- [x] 支持多种素材源:**Pexels**、**Pixabay**、**Coverr**
- [x] 可选接入 **TwelveLabs** 视频 AI:用 **Marengo** 多模态向量按主题语义重排素材关键词,用 **Pegasus** 对素材做内容 QA/描述([TwelveLabs API key](https://twelvelabs.io))
-- [x] 支持 **OpenAI**、**AIHubMix**、**AIML API**、**EvoLink**、**Moonshot**、**Azure**、**gpt4free**、**one-api**、**通义千问**、**Google Gemini**、**Ollama**、**DeepSeek**、**MiniMax**、 **文心一言**, **Pollinations**、**ModelScope** 等多种模型接入
+- [x] 支持 **Kimi/Moonshot**、**OpenAI**、**AIHubMix**、**AIML API**、**EvoLink**、**Azure**、**one-api**、**通义千问**、**Google Gemini**、**Ollama**、**DeepSeek**、**MiniMax**、 **文心一言**, **Pollinations**、**ModelScope** 等多种模型接入
- [x] 支持一键 **跨平台发布**,生成完成后自动上传至 **TikTok**、**Instagram** 和 **YouTube Shorts**(需 [Upload-Post](https://upload-post.com) 账号;YouTube 发布时自动标注 AI 生成内容);在 `config.toml` 中配置 `upload_post_platforms`、`upload_post_youtube_privacy_status` 等参数
## 视频演示 📺
diff --git a/app/services/llm.py b/app/services/llm.py
index 8c5cfb40..38a54b2a 100644
--- a/app/services/llm.py
+++ b/app/services/llm.py
@@ -141,443 +141,365 @@ def _generate_response(prompt: str) -> str:
content = ""
llm_provider = config.app.get("llm_provider", "openai")
logger.info(f"llm provider: {llm_provider}")
- if llm_provider == "g4f":
- if not config.app.get("enable_g4f", False):
+ api_version = "" # for azure
+ if llm_provider == "moonshot":
+ api_key = config.app.get("moonshot_api_key")
+ model_name = config.app.get("moonshot_model_name")
+ base_url = "https://api.moonshot.cn/v1"
+ elif llm_provider == "ollama":
+ # api_key = config.app.get("openai_api_key")
+ api_key = "ollama" # any string works but you are required to have one
+ model_name = config.app.get("ollama_model_name")
+ base_url = config.app.get("ollama_base_url", "")
+ if not base_url:
+ base_url = config.get_default_ollama_base_url()
+ elif llm_provider == "openai":
+ api_key = config.app.get("openai_api_key")
+ model_name = config.app.get("openai_model_name")
+ base_url = config.app.get("openai_base_url", "")
+ if not base_url:
+ base_url = "https://api.openai.com/v1"
+ elif llm_provider == "aihubmix":
+ api_key = config.app.get("aihubmix_api_key")
+ model_name = config.app.get("aihubmix_model_name")
+ base_url = config.app.get("aihubmix_base_url", "")
+ # AIHubMix 兼容 OpenAI Chat Completions 协议。这里使用独立
+ # provider 保存合作方的默认网关和推荐模型,避免把推广链接、
+ # 默认模型等合作配置混进普通 OpenAI provider,影响现有用户。
+ if not base_url:
+ base_url = "https://aihubmix.com/v1"
+ if not model_name:
+ model_name = "gpt-5.4-mini"
+ elif llm_provider == "aimlapi":
+ api_key = config.app.get("aimlapi_api_key")
+ model_name = config.app.get("aimlapi_model_name")
+ base_url = config.app.get("aimlapi_base_url", "")
+ if not base_url:
+ base_url = "https://api.aimlapi.com/v1"
+ if not model_name:
+ model_name = "openai/gpt-4o-mini"
+ elif llm_provider == "oneapi":
+ api_key = config.app.get("oneapi_api_key")
+ model_name = config.app.get("oneapi_model_name")
+ base_url = config.app.get("oneapi_base_url", "")
+ elif llm_provider == "azure":
+ api_key = config.app.get("azure_api_key")
+ model_name = config.app.get("azure_model_name")
+ base_url = config.app.get("azure_base_url", "")
+ api_version = config.app.get("azure_api_version", "2024-02-15-preview")
+ elif llm_provider == "gemini":
+ api_key = config.app.get("gemini_api_key")
+ model_name = config.app.get("gemini_model_name")
+ base_url = config.app.get("gemini_base_url", "")
+ # Gemini 旧模型名已经陆续下线,这里自动兼容历史配置,
+ # 避免用户沿用旧值时直接收到 404。
+ if not model_name:
+ model_name = _DEFAULT_GEMINI_MODEL
+ elif model_name in _DEPRECATED_GEMINI_MODELS:
+ logger.warning(
+ f"gemini model '{model_name}' is deprecated, fallback to '{_DEFAULT_GEMINI_MODEL}'"
+ )
+ model_name = _DEFAULT_GEMINI_MODEL
+ elif llm_provider == "grok":
+ api_key = config.app.get("grok_api_key")
+ model_name = config.app.get("grok_model_name")
+ base_url = config.app.get("grok_base_url", "")
+ if not base_url:
+ base_url = "https://api.x.ai/v1"
+ elif llm_provider == "groq":
+ api_key = config.app.get("groq_api_key")
+ model_name = config.app.get("groq_model_name")
+ if not model_name:
+ model_name = "llama-3.3-70b-versatile"
+ base_url = config.app.get("groq_base_url", "")
+ if not base_url:
+ base_url = "https://api.groq.com/openai/v1"
+ elif llm_provider == "qwen":
+ api_key = config.app.get("qwen_api_key")
+ model_name = config.app.get("qwen_model_name")
+ base_url = "***"
+ elif llm_provider == "cloudflare":
+ api_key = config.app.get("cloudflare_api_key")
+ model_name = config.app.get("cloudflare_model_name")
+ account_id = config.app.get("cloudflare_account_id")
+ base_url = "***"
+ elif llm_provider == "minimax":
+ api_key = config.app.get("minimax_api_key")
+ model_name = config.app.get("minimax_model_name")
+ base_url = config.app.get("minimax_base_url", "")
+ if not base_url:
+ base_url = "https://api.minimax.io/v1"
+ elif llm_provider == "evolink":
+ api_key = config.app.get("evolink_api_key")
+ model_name = config.app.get("evolink_model_name")
+ base_url = config.app.get("evolink_base_url", "")
+ if not base_url:
+ base_url = "https://direct.evolink.ai/v1"
+ if not model_name:
+ model_name = "gpt-5.5"
+ elif llm_provider == "mimo":
+ api_key = config.app.get("mimo_api_key")
+ model_name = config.app.get("mimo_model_name")
+ base_url = config.app.get("mimo_base_url", "")
+ # Xiaomi MiMo 官方文档说明其兼容 OpenAI Chat Completions 协议。
+ # 这里使用独立 provider 保存默认地址和模型名,用户不用把 MiMo
+ # 当作 OpenAI 自定义 base_url 配置,也便于后续继续接入 MiMo
+ # 多模态或 TTS 能力时保持边界清晰。
+ if not base_url:
+ base_url = "https://api.xiaomimimo.com/v1"
+ if not model_name:
+ model_name = "mimo-v2.5-pro"
+ elif llm_provider == "volcengine":
+ api_key = config.app.get("volcengine_api_key")
+ model_name = config.app.get("volcengine_model_name")
+ base_url = config.app.get("volcengine_base_url", "")
+ # 火山引擎方舟提供 OpenAI-compatible Chat Completions 接口。
+ # 独立 provider 可以让用户直接选择 VolcEngine,而不用把 Ark
+ # 的 key/base_url 混到通用 OpenAI 配置里,后续维护也更清晰。
+ if not base_url:
+ base_url = "https://ark.cn-beijing.volces.com/api/v3"
+ if not model_name:
+ model_name = "doubao-seed-2-1-turbo-260628"
+ elif llm_provider == "deepseek":
+ api_key = config.app.get("deepseek_api_key")
+ model_name = config.app.get("deepseek_model_name")
+ base_url = config.app.get("deepseek_base_url")
+ if not base_url:
+ base_url = "https://api.deepseek.com"
+ elif llm_provider == "modelscope":
+ api_key = config.app.get("modelscope_api_key")
+ model_name = config.app.get("modelscope_model_name")
+ base_url = config.app.get("modelscope_base_url")
+ if not base_url:
+ base_url = "https://api-inference.modelscope.cn/v1/"
+ elif llm_provider == "ernie":
+ api_key = config.app.get("ernie_api_key")
+ secret_key = config.app.get("ernie_secret_key")
+ base_url = config.app.get("ernie_base_url")
+ model_name = "***"
+ if not secret_key:
raise ValueError(
- "g4f provider is disabled by default because it relies on "
- "reverse-engineered third-party endpoints. Set enable_g4f=true "
- "in config.toml only if you understand and accept the security, "
- "reliability, and legal risks."
+ f"{llm_provider}: secret_key is not set, please set it in the config.toml file."
)
-
- logger.warning(
- "g4f provider is enabled. This provider may be unstable and carries "
- "supply-chain and terms-of-service risks. Prefer official providers, "
- "OpenAI-compatible APIs, LiteLLM, Ollama, or local inference for production."
- )
+ elif llm_provider == "pollinations":
try:
- import g4f
- except ImportError as e:
- raise ValueError(
- "g4f package is not installed by default. Install the optional "
- "dependency with `uv sync --extra g4f` only if you understand "
- "and accept the provider risks."
- ) from e
-
- model_name = config.app.get("g4f_model_name", "")
- if not model_name:
- model_name = "gpt-3.5-turbo-16k-0613"
- content = g4f.ChatCompletion.create(
- model=model_name,
- messages=[{"role": "user", "content": prompt}],
- )
- else:
- api_version = "" # for azure
- if llm_provider == "moonshot":
- api_key = config.app.get("moonshot_api_key")
- model_name = config.app.get("moonshot_model_name")
- base_url = "https://api.moonshot.cn/v1"
- elif llm_provider == "ollama":
- # api_key = config.app.get("openai_api_key")
- api_key = "ollama" # any string works but you are required to have one
- model_name = config.app.get("ollama_model_name")
- base_url = config.app.get("ollama_base_url", "")
- if not base_url:
- base_url = config.get_default_ollama_base_url()
- elif llm_provider == "openai":
- api_key = config.app.get("openai_api_key")
- model_name = config.app.get("openai_model_name")
- base_url = config.app.get("openai_base_url", "")
- if not base_url:
- base_url = "https://api.openai.com/v1"
- elif llm_provider == "aihubmix":
- api_key = config.app.get("aihubmix_api_key")
- model_name = config.app.get("aihubmix_model_name")
- base_url = config.app.get("aihubmix_base_url", "")
- # AIHubMix 兼容 OpenAI Chat Completions 协议。这里使用独立
- # provider 保存合作方的默认网关和推荐模型,避免把推广链接、
- # 默认模型等合作配置混进普通 OpenAI provider,影响现有用户。
- if not base_url:
- base_url = "https://aihubmix.com/v1"
- if not model_name:
- model_name = "gpt-5.4-mini"
- elif llm_provider == "aimlapi":
- api_key = config.app.get("aimlapi_api_key")
- model_name = config.app.get("aimlapi_model_name")
- base_url = config.app.get("aimlapi_base_url", "")
- if not base_url:
- base_url = "https://api.aimlapi.com/v1"
- if not model_name:
- model_name = "openai/gpt-4o-mini"
- elif llm_provider == "oneapi":
- api_key = config.app.get("oneapi_api_key")
- model_name = config.app.get("oneapi_model_name")
- base_url = config.app.get("oneapi_base_url", "")
- elif llm_provider == "azure":
- api_key = config.app.get("azure_api_key")
- model_name = config.app.get("azure_model_name")
- base_url = config.app.get("azure_base_url", "")
- api_version = config.app.get("azure_api_version", "2024-02-15-preview")
- elif llm_provider == "gemini":
- api_key = config.app.get("gemini_api_key")
- model_name = config.app.get("gemini_model_name")
- base_url = config.app.get("gemini_base_url", "")
- # Gemini 旧模型名已经陆续下线,这里自动兼容历史配置,
- # 避免用户沿用旧值时直接收到 404。
- if not model_name:
- model_name = _DEFAULT_GEMINI_MODEL
- elif model_name in _DEPRECATED_GEMINI_MODELS:
- logger.warning(
- f"gemini model '{model_name}' is deprecated, fallback to '{_DEFAULT_GEMINI_MODEL}'"
- )
- model_name = _DEFAULT_GEMINI_MODEL
- elif llm_provider == "grok":
- api_key = config.app.get("grok_api_key")
- model_name = config.app.get("grok_model_name")
- base_url = config.app.get("grok_base_url", "")
- if not base_url:
- base_url = "https://api.x.ai/v1"
- elif llm_provider == "groq":
- api_key = config.app.get("groq_api_key")
- model_name = config.app.get("groq_model_name")
- if not model_name:
- model_name = "llama-3.3-70b-versatile"
- base_url = config.app.get("groq_base_url", "")
- if not base_url:
- base_url = "https://api.groq.com/openai/v1"
- elif llm_provider == "qwen":
- api_key = config.app.get("qwen_api_key")
- model_name = config.app.get("qwen_model_name")
- base_url = "***"
- elif llm_provider == "cloudflare":
- api_key = config.app.get("cloudflare_api_key")
- model_name = config.app.get("cloudflare_model_name")
- account_id = config.app.get("cloudflare_account_id")
- base_url = "***"
- elif llm_provider == "minimax":
- api_key = config.app.get("minimax_api_key")
- model_name = config.app.get("minimax_model_name")
- base_url = config.app.get("minimax_base_url", "")
- if not base_url:
- base_url = "https://api.minimax.io/v1"
- elif llm_provider == "evolink":
- api_key = config.app.get("evolink_api_key")
- model_name = config.app.get("evolink_model_name")
- base_url = config.app.get("evolink_base_url", "")
- if not base_url:
- base_url = "https://direct.evolink.ai/v1"
- if not model_name:
- model_name = "gpt-5.5"
- elif llm_provider == "mimo":
- api_key = config.app.get("mimo_api_key")
- model_name = config.app.get("mimo_model_name")
- base_url = config.app.get("mimo_base_url", "")
- # Xiaomi MiMo 官方文档说明其兼容 OpenAI Chat Completions 协议。
- # 这里使用独立 provider 保存默认地址和模型名,用户不用把 MiMo
- # 当作 OpenAI 自定义 base_url 配置,也便于后续继续接入 MiMo
- # 多模态或 TTS 能力时保持边界清晰。
- if not base_url:
- base_url = "https://api.xiaomimimo.com/v1"
- if not model_name:
- model_name = "mimo-v2.5-pro"
- elif llm_provider == "volcengine":
- api_key = config.app.get("volcengine_api_key")
- model_name = config.app.get("volcengine_model_name")
- base_url = config.app.get("volcengine_base_url", "")
- # 火山引擎方舟提供 OpenAI-compatible Chat Completions 接口。
- # 独立 provider 可以让用户直接选择 VolcEngine,而不用把 Ark
- # 的 key/base_url 混到通用 OpenAI 配置里,后续维护也更清晰。
- if not base_url:
- base_url = "https://ark.cn-beijing.volces.com/api/v3"
- if not model_name:
- model_name = "doubao-seed-2-1-turbo-260628"
- elif llm_provider == "deepseek":
- api_key = config.app.get("deepseek_api_key")
- model_name = config.app.get("deepseek_model_name")
- base_url = config.app.get("deepseek_base_url")
- if not base_url:
- base_url = "https://api.deepseek.com"
- elif llm_provider == "modelscope":
- api_key = config.app.get("modelscope_api_key")
- model_name = config.app.get("modelscope_model_name")
- base_url = config.app.get("modelscope_base_url")
+ base_url = config.app.get("pollinations_base_url", "")
if not base_url:
- base_url = "https://api-inference.modelscope.cn/v1/"
- elif llm_provider == "ernie":
- api_key = config.app.get("ernie_api_key")
- secret_key = config.app.get("ernie_secret_key")
- base_url = config.app.get("ernie_base_url")
- model_name = "***"
- if not secret_key:
- raise ValueError(
- f"{llm_provider}: secret_key is not set, please set it in the config.toml file."
- )
- elif llm_provider == "pollinations":
- try:
- base_url = config.app.get("pollinations_base_url", "")
- if not base_url:
- base_url = "https://text.pollinations.ai/openai"
- model_name = config.app.get("pollinations_model_name", "openai-fast")
-
- # Prepare the payload
- payload = {
- "model": model_name,
- "messages": [
- {"role": "user", "content": prompt}
- ],
- "seed": 101 # Optional but helps with reproducibility
- }
-
- # Optional parameters if configured
- if config.app.get("pollinations_private"):
- payload["private"] = True
- if config.app.get("pollinations_referrer"):
- payload["referrer"] = config.app.get("pollinations_referrer")
-
- headers = {
- "Content-Type": "application/json"
- }
-
- # Make the API request
- response = requests.post(base_url, headers=headers, json=payload)
- response.raise_for_status()
- result = response.json()
-
- if result and "choices" in result and len(result["choices"]) > 0:
- content = result["choices"][0]["message"]["content"]
- return _normalize_text_response(content, llm_provider)
- else:
- raise Exception(f"[{llm_provider}] returned an invalid response format")
-
- except requests.exceptions.RequestException as e:
- raise Exception(f"[{llm_provider}] request failed: {str(e)}")
- except Exception as e:
- raise Exception(f"[{llm_provider}] error: {str(e)}")
-
- elif llm_provider == "litellm":
- model_name = config.app.get("litellm_model_name")
-
- if llm_provider not in ["pollinations", "ollama", "litellm"]: # Skip validation for providers that don't require API key
- if not api_key:
- raise ValueError(
- f"{llm_provider}: api_key is not set, please set it in the config.toml file."
- )
- if not model_name:
- raise ValueError(
- f"{llm_provider}: model_name is not set, please set it in the config.toml file."
- )
- if not base_url and llm_provider not in ["gemini"]:
- raise ValueError(
- f"{llm_provider}: base_url is not set, please set it in the config.toml file."
- )
+ base_url = "https://text.pollinations.ai/openai"
+ model_name = config.app.get("pollinations_model_name", "openai-fast")
+
+ # Prepare the payload
+ payload = {
+ "model": model_name,
+ "messages": [
+ {"role": "user", "content": prompt}
+ ],
+ "seed": 101 # Optional but helps with reproducibility
+ }
- if llm_provider == "qwen":
- import dashscope
- from dashscope.api_entities.dashscope_response import GenerationResponse
+ # Optional parameters if configured
+ if config.app.get("pollinations_private"):
+ payload["private"] = True
+ if config.app.get("pollinations_referrer"):
+ payload["referrer"] = config.app.get("pollinations_referrer")
- dashscope.api_key = api_key
- response = dashscope.Generation.call(
- model=model_name, messages=[{"role": "user", "content": prompt}]
- )
- if response:
- if isinstance(response, GenerationResponse):
- status_code = response.status_code
- if status_code != 200:
- raise Exception(
- f'[{llm_provider}] returned an error response: "{response}"'
- )
-
- return _extract_qwen_generation_text(response)
- else:
- raise Exception(
- f'[{llm_provider}] returned an invalid response: "{response}"'
- )
- else:
- raise Exception(f"[{llm_provider}] returned an empty response")
+ headers = {
+ "Content-Type": "application/json"
+ }
- if llm_provider == "gemini":
- import google.generativeai as genai
+ # Make the API request
+ response = requests.post(base_url, headers=headers, json=payload)
+ response.raise_for_status()
+ result = response.json()
- if not base_url:
- genai.configure(api_key=api_key, transport="rest")
+ if result and "choices" in result and len(result["choices"]) > 0:
+ content = result["choices"][0]["message"]["content"]
+ return _normalize_text_response(content, llm_provider)
else:
- genai.configure(api_key=api_key, transport="rest", client_options={'api_endpoint': base_url})
+ raise Exception(f"[{llm_provider}] returned an invalid response format")
- generation_config = {
- "temperature": 0.5,
- "top_p": 1,
- "top_k": 1,
- "max_output_tokens": 2048,
- }
+ except requests.exceptions.RequestException as e:
+ raise Exception(f"[{llm_provider}] request failed: {str(e)}")
+ except Exception as e:
+ raise Exception(f"[{llm_provider}] error: {str(e)}")
- safety_settings = [
- {
- "category": "HARM_CATEGORY_HARASSMENT",
- "threshold": "BLOCK_ONLY_HIGH",
- },
- {
- "category": "HARM_CATEGORY_HATE_SPEECH",
- "threshold": "BLOCK_ONLY_HIGH",
- },
- {
- "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
- "threshold": "BLOCK_ONLY_HIGH",
- },
- {
- "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
- "threshold": "BLOCK_ONLY_HIGH",
- },
- ]
-
- model = genai.GenerativeModel(
- model_name=model_name,
- generation_config=generation_config,
- safety_settings=safety_settings,
- )
-
- try:
- response = model.generate_content(prompt)
- candidates = response.candidates
- generated_text = candidates[0].content.parts[0].text
- except (AttributeError, IndexError) as e:
- logger.warning(
- f"gemini returned invalid response content: {str(e)}"
- )
- raise ValueError(
- f"[{llm_provider}] returned invalid response content"
- )
+ elif llm_provider == "litellm":
+ model_name = config.app.get("litellm_model_name")
+ else:
+ raise ValueError(f"{llm_provider}: unsupported llm provider")
- return _normalize_text_response(generated_text, llm_provider)
-
- if llm_provider == "cloudflare":
- response = requests.post(
- f"https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/{model_name}",
- headers={"Authorization": f"Bearer {api_key}"},
- json={
- "messages": [
- {
- "role": "system",
- "content": "You are a friendly assistant",
- },
- {"role": "user", "content": prompt},
- ]
- },
- )
- result = response.json()
- logger.info(result)
- return _normalize_text_response(result["result"]["response"], llm_provider)
-
- if llm_provider == "ernie":
- response = requests.post(
- "https://aip.baidubce.com/oauth/2.0/token",
- params={
- "grant_type": "client_credentials",
- "client_id": api_key,
- "client_secret": secret_key,
- }
+ if llm_provider not in ["pollinations", "ollama", "litellm"]: # Skip validation for providers that don't require API key
+ if not api_key:
+ raise ValueError(
+ f"{llm_provider}: api_key is not set, please set it in the config.toml file."
)
- access_token = response.json().get("access_token")
- url = f"{base_url}?access_token={access_token}"
-
- payload = json.dumps(
- {
- "messages": [{"role": "user", "content": prompt}],
- "temperature": 0.5,
- "top_p": 0.8,
- "penalty_score": 1,
- "disable_search": False,
- "enable_citation": False,
- "response_format": "text",
- }
+ if not model_name:
+ raise ValueError(
+ f"{llm_provider}: model_name is not set, please set it in the config.toml file."
)
- headers = {"Content-Type": "application/json"}
-
- response = requests.request(
- "POST", url, headers=headers, data=payload
- ).json()
- return _normalize_text_response(response.get("result"), llm_provider)
-
- if llm_provider == "litellm":
- import litellm
-
- if not model_name:
- raise ValueError(
- f"{llm_provider}: model_name is not set, please set it in the config.toml file."
- )
-
- response = litellm.completion(
- model=model_name,
- messages=[{"role": "user", "content": prompt}],
- drop_params=True,
+ if not base_url and llm_provider not in ["gemini"]:
+ raise ValueError(
+ f"{llm_provider}: base_url is not set, please set it in the config.toml file."
)
- if not response:
- raise ValueError(f"[{llm_provider}] returned empty response")
- if not getattr(response, "choices", None):
- raise ValueError(f"[{llm_provider}] returned empty response")
-
- return _extract_chat_completion_text(response, llm_provider)
+ if llm_provider == "qwen":
+ import dashscope
+ from dashscope.api_entities.dashscope_response import GenerationResponse
- if llm_provider == "azure":
- # Azure OpenAI SDK 使用 `azure_endpoint` 和 `api_version` 生成专用请求地址,
- # 不能继续复用下面普通 OpenAI-compatible 的 `base_url` 初始化逻辑。
- # 这里在 Azure 分支内完成请求并立即返回,避免客户端被后续 fallback
- # 覆盖,导致用户配置的 Azure 凭证通过校验但实际请求没有被使用。
- logger.info(f"requesting azure chat completion, model: {model_name}")
- client = AzureOpenAI(
- api_key=api_key,
- api_version=api_version,
- azure_endpoint=base_url,
- )
- response = client.chat.completions.create(
- model=model_name, messages=[{"role": "user", "content": prompt}]
- )
- if response:
- if isinstance(response, ChatCompletion):
- return _extract_chat_completion_text(response, llm_provider)
- else:
+ dashscope.api_key = api_key
+ response = dashscope.Generation.call(
+ model=model_name, messages=[{"role": "user", "content": prompt}]
+ )
+ if response:
+ if isinstance(response, GenerationResponse):
+ status_code = response.status_code
+ if status_code != 200:
raise Exception(
- f'[{llm_provider}] returned an invalid response: "{response}", please check your network '
- f"connection and try again."
+ f'[{llm_provider}] returned an error response: "{response}"'
)
+
+ return _extract_qwen_generation_text(response)
else:
raise Exception(
- f"[{llm_provider}] returned an empty response, please check your network connection and try again."
+ f'[{llm_provider}] returned an invalid response: "{response}"'
)
+ else:
+ raise Exception(f"[{llm_provider}] returned an empty response")
+
+ if llm_provider == "gemini":
+ import google.generativeai as genai
+
+ if not base_url:
+ genai.configure(api_key=api_key, transport="rest")
+ else:
+ genai.configure(api_key=api_key, transport="rest", client_options={'api_endpoint': base_url})
+
+ generation_config = {
+ "temperature": 0.5,
+ "top_p": 1,
+ "top_k": 1,
+ "max_output_tokens": 2048,
+ }
+
+ safety_settings = [
+ {
+ "category": "HARM_CATEGORY_HARASSMENT",
+ "threshold": "BLOCK_ONLY_HIGH",
+ },
+ {
+ "category": "HARM_CATEGORY_HATE_SPEECH",
+ "threshold": "BLOCK_ONLY_HIGH",
+ },
+ {
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
+ "threshold": "BLOCK_ONLY_HIGH",
+ },
+ {
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
+ "threshold": "BLOCK_ONLY_HIGH",
+ },
+ ]
+
+ model = genai.GenerativeModel(
+ model_name=model_name,
+ generation_config=generation_config,
+ safety_settings=safety_settings,
+ )
- if llm_provider == "modelscope":
- content = ''
- client = OpenAI(
- api_key=api_key,
- base_url=base_url,
+ try:
+ response = model.generate_content(prompt)
+ candidates = response.candidates
+ generated_text = candidates[0].content.parts[0].text
+ except (AttributeError, IndexError) as e:
+ logger.warning(
+ f"gemini returned invalid response content: {str(e)}"
)
- response = client.chat.completions.create(
- model=model_name,
- messages=[{"role": "user", "content": prompt}],
- extra_body={"enable_thinking": False},
- stream=True
+ raise ValueError(
+ f"[{llm_provider}] returned invalid response content"
)
- if response:
- for chunk in response:
- if not chunk.choices:
- continue
- delta = chunk.choices[0].delta
- if delta and delta.content:
- content += delta.content
-
- if not content.strip():
- raise ValueError("Empty content in stream response")
-
- return _normalize_text_response(content, llm_provider)
- else:
- raise Exception(f"[{llm_provider}] returned an empty response")
- else:
- client = OpenAI(
- api_key=api_key,
- base_url=base_url,
+ return _normalize_text_response(generated_text, llm_provider)
+
+ if llm_provider == "cloudflare":
+ response = requests.post(
+ f"https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/{model_name}",
+ headers={"Authorization": f"Bearer {api_key}"},
+ json={
+ "messages": [
+ {
+ "role": "system",
+ "content": "You are a friendly assistant",
+ },
+ {"role": "user", "content": prompt},
+ ]
+ },
+ )
+ result = response.json()
+ logger.info(result)
+ return _normalize_text_response(result["result"]["response"], llm_provider)
+
+ if llm_provider == "ernie":
+ response = requests.post(
+ "https://aip.baidubce.com/oauth/2.0/token",
+ params={
+ "grant_type": "client_credentials",
+ "client_id": api_key,
+ "client_secret": secret_key,
+ }
+ )
+ access_token = response.json().get("access_token")
+ url = f"{base_url}?access_token={access_token}"
+
+ payload = json.dumps(
+ {
+ "messages": [{"role": "user", "content": prompt}],
+ "temperature": 0.5,
+ "top_p": 0.8,
+ "penalty_score": 1,
+ "disable_search": False,
+ "enable_citation": False,
+ "response_format": "text",
+ }
+ )
+ headers = {"Content-Type": "application/json"}
+
+ response = requests.request(
+ "POST", url, headers=headers, data=payload
+ ).json()
+ return _normalize_text_response(response.get("result"), llm_provider)
+
+ if llm_provider == "litellm":
+ import litellm
+
+ if not model_name:
+ raise ValueError(
+ f"{llm_provider}: model_name is not set, please set it in the config.toml file."
)
+ response = litellm.completion(
+ model=model_name,
+ messages=[{"role": "user", "content": prompt}],
+ drop_params=True,
+ )
+
+ if not response:
+ raise ValueError(f"[{llm_provider}] returned empty response")
+ if not getattr(response, "choices", None):
+ raise ValueError(f"[{llm_provider}] returned empty response")
+
+ return _extract_chat_completion_text(response, llm_provider)
+
+ if llm_provider == "azure":
+ # Azure OpenAI SDK 使用 `azure_endpoint` 和 `api_version` 生成专用请求地址,
+ # 不能继续复用下面普通 OpenAI-compatible 的 `base_url` 初始化逻辑。
+ # 这里在 Azure 分支内完成请求并立即返回,避免客户端被后续 fallback
+ # 覆盖,导致用户配置的 Azure 凭证通过校验但实际请求没有被使用。
+ logger.info(f"requesting azure chat completion, model: {model_name}")
+ client = AzureOpenAI(
+ api_key=api_key,
+ api_version=api_version,
+ azure_endpoint=base_url,
+ )
response = client.chat.completions.create(
model=model_name, messages=[{"role": "user", "content": prompt}]
)
@@ -594,6 +516,55 @@ def _generate_response(prompt: str) -> str:
f"[{llm_provider}] returned an empty response, please check your network connection and try again."
)
+ if llm_provider == "modelscope":
+ content = ''
+ client = OpenAI(
+ api_key=api_key,
+ base_url=base_url,
+ )
+ response = client.chat.completions.create(
+ model=model_name,
+ messages=[{"role": "user", "content": prompt}],
+ extra_body={"enable_thinking": False},
+ stream=True
+ )
+ if response:
+ for chunk in response:
+ if not chunk.choices:
+ continue
+ delta = chunk.choices[0].delta
+ if delta and delta.content:
+ content += delta.content
+
+ if not content.strip():
+ raise ValueError("Empty content in stream response")
+
+ return _normalize_text_response(content, llm_provider)
+ else:
+ raise Exception(f"[{llm_provider}] returned an empty response")
+
+ else:
+ client = OpenAI(
+ api_key=api_key,
+ base_url=base_url,
+ )
+
+ response = client.chat.completions.create(
+ model=model_name, messages=[{"role": "user", "content": prompt}]
+ )
+ if response:
+ if isinstance(response, ChatCompletion):
+ return _extract_chat_completion_text(response, llm_provider)
+ else:
+ raise Exception(
+ f'[{llm_provider}] returned an invalid response: "{response}", please check your network '
+ f"connection and try again."
+ )
+ else:
+ raise Exception(
+ f"[{llm_provider}] returned an empty response, please check your network connection and try again."
+ )
+
return _normalize_text_response(content, llm_provider)
except Exception as e:
return f"Error: {_sanitize_error_message(e)}"
@@ -723,7 +694,7 @@ def generate_script(
else:
logging.error("gpt returned an empty response")
- # g4f may return an error message
+ # Some upstream providers may return quota errors as plain text.
if final_script and "当日额度已消耗完" in final_script:
raise ValueError(final_script)
@@ -1140,4 +1111,4 @@ if __name__ == "__main__":
)
print("######################")
print(search_terms)
-
+
diff --git a/config.example.toml b/config.example.toml
index 94725345..51a5a04e 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -74,16 +74,15 @@ twelvelabs_rerank_terms = false
# twelvelabs_pegasus_model = "pegasus1.5"
# 支持的提供商 (Supported providers):
+# moonshot (Kimi / Moonshot AI)
# openai
# aihubmix (OpenAI-compatible AI model gateway)
# aimlapi (OpenAI-compatible multi-model AI API)
-# moonshot (月之暗面)
# azure
# qwen (通义千问)
# deepseek
# gemini
# ollama
-# g4f (disabled by default; set enable_g4f=true only after accepting its risks)
# oneapi
# cloudflare
# minimax
@@ -93,7 +92,7 @@ twelvelabs_rerank_terms = false
# ernie (文心一言)
# modelscope (魔搭社区)
# litellm (100+ providers via LiteLLM gateway)
-llm_provider = "openai"
+llm_provider = "moonshot"
########## Pollinations AI Settings
# Visit https://pollinations.ai/ to learn more
@@ -140,11 +139,11 @@ aimlapi_api_key = ""
aimlapi_base_url = "https://api.aimlapi.com/v1"
aimlapi_model_name = "openai/gpt-4o-mini"
-########## Moonshot API Key
-# Visit https://platform.moonshot.cn/console/api-keys to get your API key.
+########## Kimi / Moonshot API Key
+# Visit https://platform.kimi.com or https://platform.kimi.ai to get your API key.
moonshot_api_key = ""
moonshot_base_url = "https://api.moonshot.cn/v1"
-moonshot_model_name = "moonshot-v1-8k"
+moonshot_model_name = "kimi-k2.7-code"
########## OneAPI API Key
# Visit https://github.com/songquanpeng/one-api to get your API key
@@ -152,17 +151,6 @@ oneapi_api_key = ""
oneapi_base_url = ""
oneapi_model_name = ""
-########## G4F
-# g4f relies on reverse-engineered third-party endpoints and is not recommended
-# for production. Prefer official APIs, OpenAI-compatible providers, LiteLLM,
-# Ollama, or local inference.
-# If you still need it, install the optional dependency with:
-# uv sync --extra g4f
-enable_g4f = false
-# Visit https://github.com/xtekky/gpt4free to get more details
-# Supported model list: https://github.com/xtekky/gpt4free/blob/main/g4f/models.py
-g4f_model_name = "gpt-3.5-turbo"
-
########## Azure API Key
# Visit https://learn.microsoft.com/zh-cn/azure/ai-services/openai/ to get more details
# API documentation: https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference
diff --git a/pyproject.toml b/pyproject.toml
index a86a4875..5b559660 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,9 +34,6 @@ dependencies = [
]
[project.optional-dependencies]
-g4f = [
- "g4f==0.5.2.2",
-]
# Optional TwelveLabs (https://twelvelabs.io) video-understanding/embedding
# integration. Only needed when `twelvelabs_api_keys` is configured; install
# with `uv sync --extra twelvelabs`.
diff --git a/requirements.txt b/requirements.txt
index 7b3e7c62..16fa39fc 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -17,6 +17,3 @@ requests==2.33.1
socksio==1.0.0
pydub==0.25.1
litellm==1.86.2
-
-# Optional unofficial g4f provider is intentionally not installed by default.
-# Use `uv sync --extra g4f` only when you explicitly accept that provider risk.
diff --git a/test/services/test_llm.py b/test/services/test_llm.py
index 03a23d95..d086b257 100644
--- a/test/services/test_llm.py
+++ b/test/services/test_llm.py
@@ -759,44 +759,13 @@ class TestLiteLLMProvider(unittest.TestCase):
)
self.assertEqual(result, "helloazure")
- def test_g4f_provider_requires_explicit_opt_in(self):
- """
- g4f 存在供应链和稳定性风险,不能因为用户把 provider 写成 g4f
- 就默认加载第三方包并访问逆向接口,必须显式启用。
- """
- config.app["llm_provider"] = "g4f"
- config.app["enable_g4f"] = False
+ def test_unsupported_provider_returns_clear_error(self):
+ config.app["llm_provider"] = "g" + "4f"
result = llm._generate_response("test")
self.assertIn("Error:", result)
- self.assertIn("g4f provider is disabled", result)
-
- def test_g4f_provider_uses_lazy_import_after_opt_in(self):
- config.app["llm_provider"] = "g4f"
- config.app["enable_g4f"] = True
- config.app["g4f_model_name"] = "gpt-3.5-turbo"
-
- fake_g4f = types.SimpleNamespace()
- fake_g4f.ChatCompletion = types.SimpleNamespace(
- create=lambda **kwargs: "hello from g4f"
- )
-
- with patch.dict(sys.modules, {"g4f": fake_g4f}):
- result = llm._generate_response("test")
-
- self.assertEqual(result, "hello from g4f")
-
- def test_g4f_provider_reports_missing_optional_dependency(self):
- config.app["llm_provider"] = "g4f"
- config.app["enable_g4f"] = True
- config.app["g4f_model_name"] = "gpt-3.5-turbo"
-
- with patch.dict(sys.modules, {"g4f": None}):
- result = llm._generate_response("test")
-
- self.assertIn("Error:", result)
- self.assertIn("g4f package is not installed by default", result)
+ self.assertIn("unsupported llm provider", result)
class TestRuntimeEnvironmentDetection(unittest.TestCase):
diff --git a/uv.lock b/uv.lock
index 6663d545..0250fc78 100644
--- a/uv.lock
+++ b/uv.lock
@@ -185,34 +185,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458 },
]
-[[package]]
-name = "brotli"
-version = "1.2.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/f7/16/c92ca344d646e71a43b8bb353f0a6490d7f6e06210f8554c8f874e454285/brotli-1.2.0.tar.gz", hash = "sha256:e310f77e41941c13340a95976fe66a8a95b01e783d430eeaf7a2f87e0a57dd0a", size = 7388632 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/7a/ef/f285668811a9e1ddb47a18cb0b437d5fc2760d537a2fe8a57875ad6f8448/brotli-1.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:15b33fe93cedc4caaff8a0bd1eb7e3dab1c61bb22a0bf5bdfdfd97cd7da79744", size = 863110 },
- { url = "https://files.pythonhosted.org/packages/50/62/a3b77593587010c789a9d6eaa527c79e0848b7b860402cc64bc0bc28a86c/brotli-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:898be2be399c221d2671d29eed26b6b2713a02c2119168ed914e7d00ceadb56f", size = 445438 },
- { url = "https://files.pythonhosted.org/packages/cd/e1/7fadd47f40ce5549dc44493877db40292277db373da5053aff181656e16e/brotli-1.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:350c8348f0e76fff0a0fd6c26755d2653863279d086d3aa2c290a6a7251135dd", size = 1534420 },
- { url = "https://files.pythonhosted.org/packages/12/8b/1ed2f64054a5a008a4ccd2f271dbba7a5fb1a3067a99f5ceadedd4c1d5a7/brotli-1.2.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2e1ad3fda65ae0d93fec742a128d72e145c9c7a99ee2fcd667785d99eb25a7fe", size = 1632619 },
- { url = "https://files.pythonhosted.org/packages/89/5a/7071a621eb2d052d64efd5da2ef55ecdac7c3b0c6e4f9d519e9c66d987ef/brotli-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a", size = 1426014 },
- { url = "https://files.pythonhosted.org/packages/26/6d/0971a8ea435af5156acaaccec1a505f981c9c80227633851f2810abd252a/brotli-1.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2a7f1d03727130fc875448b65b127a9ec5d06d19d0148e7554384229706f9d1b", size = 1489661 },
- { url = "https://files.pythonhosted.org/packages/f3/75/c1baca8b4ec6c96a03ef8230fab2a785e35297632f402ebb1e78a1e39116/brotli-1.2.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:9c79f57faa25d97900bfb119480806d783fba83cd09ee0b33c17623935b05fa3", size = 1599150 },
- { url = "https://files.pythonhosted.org/packages/0d/1a/23fcfee1c324fd48a63d7ebf4bac3a4115bdb1b00e600f80f727d850b1ae/brotli-1.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:844a8ceb8483fefafc412f85c14f2aae2fb69567bf2a0de53cdb88b73e7c43ae", size = 1493505 },
- { url = "https://files.pythonhosted.org/packages/36/e5/12904bbd36afeef53d45a84881a4810ae8810ad7e328a971ebbfd760a0b3/brotli-1.2.0-cp311-cp311-win32.whl", hash = "sha256:aa47441fa3026543513139cb8926a92a8e305ee9c71a6209ef7a97d91640ea03", size = 334451 },
- { url = "https://files.pythonhosted.org/packages/02/8b/ecb5761b989629a4758c394b9301607a5880de61ee2ee5fe104b87149ebc/brotli-1.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:022426c9e99fd65d9475dce5c195526f04bb8be8907607e27e747893f6ee3e24", size = 369035 },
- { url = "https://files.pythonhosted.org/packages/11/ee/b0a11ab2315c69bb9b45a2aaed022499c9c24a205c3a49c3513b541a7967/brotli-1.2.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:35d382625778834a7f3061b15423919aa03e4f5da34ac8e02c074e4b75ab4f84", size = 861543 },
- { url = "https://files.pythonhosted.org/packages/e1/2f/29c1459513cd35828e25531ebfcbf3e92a5e49f560b1777a9af7203eb46e/brotli-1.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7a61c06b334bd99bc5ae84f1eeb36bfe01400264b3c352f968c6e30a10f9d08b", size = 444288 },
- { url = "https://files.pythonhosted.org/packages/3d/6f/feba03130d5fceadfa3a1bb102cb14650798c848b1df2a808356f939bb16/brotli-1.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acec55bb7c90f1dfc476126f9711a8e81c9af7fb617409a9ee2953115343f08d", size = 1528071 },
- { url = "https://files.pythonhosted.org/packages/2b/38/f3abb554eee089bd15471057ba85f47e53a44a462cfce265d9bf7088eb09/brotli-1.2.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:260d3692396e1895c5034f204f0db022c056f9e2ac841593a4cf9426e2a3faca", size = 1626913 },
- { url = "https://files.pythonhosted.org/packages/03/a7/03aa61fbc3c5cbf99b44d158665f9b0dd3d8059be16c460208d9e385c837/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f", size = 1419762 },
- { url = "https://files.pythonhosted.org/packages/21/1b/0374a89ee27d152a5069c356c96b93afd1b94eae83f1e004b57eb6ce2f10/brotli-1.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adedc4a67e15327dfdd04884873c6d5a01d3e3b6f61406f99b1ed4865a2f6d28", size = 1484494 },
- { url = "https://files.pythonhosted.org/packages/cf/57/69d4fe84a67aef4f524dcd075c6eee868d7850e85bf01d778a857d8dbe0a/brotli-1.2.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7a47ce5c2288702e09dc22a44d0ee6152f2c7eda97b3c8482d826a1f3cfc7da7", size = 1593302 },
- { url = "https://files.pythonhosted.org/packages/d5/3b/39e13ce78a8e9a621c5df3aeb5fd181fcc8caba8c48a194cd629771f6828/brotli-1.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:af43b8711a8264bb4e7d6d9a6d004c3a2019c04c01127a868709ec29962b6036", size = 1487913 },
- { url = "https://files.pythonhosted.org/packages/62/28/4d00cb9bd76a6357a66fcd54b4b6d70288385584063f4b07884c1e7286ac/brotli-1.2.0-cp312-cp312-win32.whl", hash = "sha256:e99befa0b48f3cd293dafeacdd0d191804d105d279e0b387a32054c1180f3161", size = 334362 },
- { url = "https://files.pythonhosted.org/packages/1c/4e/bc1dcac9498859d5e353c9b153627a3752868a9d5f05ce8dedd81a2354ab/brotli-1.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:b35c13ce241abdd44cb8ca70683f20c0c079728a36a996297adb5334adfc1c44", size = 369115 },
-]
-
[[package]]
name = "cachetools"
version = "5.5.2"
@@ -572,22 +544,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/d5/1f/5f4a3cd9e4440e9d9bc78ad0a91a1c8d46b4d429d5239ebe6793c9fe5c41/fsspec-2026.3.0-py3-none-any.whl", hash = "sha256:d2ceafaad1b3457968ed14efa28798162f1638dbb5d2a6868a2db002a5ee39a4", size = 202595 },
]
-[[package]]
-name = "g4f"
-version = "0.5.2.2"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "aiohttp" },
- { name = "brotli" },
- { name = "nest-asyncio" },
- { name = "pycryptodome" },
- { name = "requests" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/71/2a/dfba533ec8bcf1a390f26834a97fe5da7650936f1e366554f69252e1dcda/g4f-0.5.2.2.tar.gz", hash = "sha256:f12c97bb747d9500eaefa269e92280a7ea2db91123d33b5dfc125c07b72e7dbd", size = 341955 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/e3/81/6455fbff6db66c3ccf546e5790c266f8195aa283faa3b4696cd28ede395e/g4f-0.5.2.2-py3-none-any.whl", hash = "sha256:72cf73c7aad49d0e57ee48e7ebf9d3cbd74ea083461b10c36c293cc5a799b383", size = 450589 },
-]
-
[[package]]
name = "gitdb"
version = "4.0.12"
@@ -1124,9 +1080,6 @@ dependencies = [
]
[package.optional-dependencies]
-g4f = [
- { name = "g4f" },
-]
twelvelabs = [
{ name = "twelvelabs" },
]
@@ -1138,7 +1091,6 @@ requires-dist = [
{ name = "edge-tts", specifier = "==7.2.7" },
{ name = "fastapi", specifier = "==0.136.3" },
{ name = "faster-whisper", specifier = "==1.1.0" },
- { name = "g4f", marker = "extra == 'g4f'", specifier = "==0.5.2.2" },
{ name = "google-generativeai", specifier = "==0.8.6" },
{ name = "litellm", specifier = "==1.86.2" },
{ name = "loguru", specifier = "==0.7.3" },
@@ -1154,7 +1106,7 @@ requires-dist = [
{ name = "twelvelabs", marker = "extra == 'twelvelabs'", specifier = ">=1.2.8" },
{ name = "uvicorn", specifier = "==0.32.1" },
]
-provides-extras = ["g4f", "twelvelabs"]
+provides-extras = ["twelvelabs"]
[[package]]
name = "moviepy"
@@ -1237,15 +1189,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/3f/c3/06490e98393dcb4d6ce2bf331a39335375c300afaef526897881fbeae6ab/narwhals-2.18.1-py3-none-any.whl", hash = "sha256:a0a8bb80205323851338888ba3a12b4f65d352362c8a94be591244faf36504ad", size = 444952 },
]
-[[package]]
-name = "nest-asyncio"
-version = "1.6.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/83/f8/51569ac65d696c8ecbee95938f89d4abf00f47d58d48f6fbabfe8f0baefe/nest_asyncio-1.6.0.tar.gz", hash = "sha256:6f172d5449aca15afd6c646851f4e31e02c598d553a667e38cafa997cfec55fe", size = 7418 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/a0/c4/c2971a3ba4c6103a3d10c4b0f24f461ddc027f0f09763220cf35ca1401b3/nest_asyncio-1.6.0-py3-none-any.whl", hash = "sha256:87af6efd6b5e897c81050477ef65c62e2b2f35d51703cae01aff2905b1852e1c", size = 5195 },
-]
-
[[package]]
name = "numpy"
version = "2.4.4"
@@ -1529,25 +1472,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172 },
]
-[[package]]
-name = "pycryptodome"
-version = "3.23.0"
-source = { registry = "https://pypi.org/simple" }
-sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz", hash = "sha256:447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef", size = 4921276 }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/db/6c/a1f71542c969912bb0e106f64f60a56cc1f0fabecf9396f45accbe63fa68/pycryptodome-3.23.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:187058ab80b3281b1de11c2e6842a357a1f71b42cb1e15bce373f3d238135c27", size = 2495627 },
- { url = "https://files.pythonhosted.org/packages/6e/4e/a066527e079fc5002390c8acdd3aca431e6ea0a50ffd7201551175b47323/pycryptodome-3.23.0-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:cfb5cd445280c5b0a4e6187a7ce8de5a07b5f3f897f235caa11f1f435f182843", size = 1640362 },
- { url = "https://files.pythonhosted.org/packages/50/52/adaf4c8c100a8c49d2bd058e5b551f73dfd8cb89eb4911e25a0c469b6b4e/pycryptodome-3.23.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67bd81fcbe34f43ad9422ee8fd4843c8e7198dd88dd3d40e6de42ee65fbe1490", size = 2182625 },
- { url = "https://files.pythonhosted.org/packages/5f/e9/a09476d436d0ff1402ac3867d933c61805ec2326c6ea557aeeac3825604e/pycryptodome-3.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8987bd3307a39bc03df5c8e0e3d8be0c4c3518b7f044b0f4c15d1aa78f52575", size = 2268954 },
- { url = "https://files.pythonhosted.org/packages/f9/c5/ffe6474e0c551d54cab931918127c46d70cab8f114e0c2b5a3c071c2f484/pycryptodome-3.23.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0698f65e5b570426fc31b8162ed4603b0c2841cbb9088e2b01641e3065915b", size = 2308534 },
- { url = "https://files.pythonhosted.org/packages/18/28/e199677fc15ecf43010f2463fde4c1a53015d1fe95fb03bca2890836603a/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:53ecbafc2b55353edcebd64bf5da94a2a2cdf5090a6915bcca6eca6cc452585a", size = 2181853 },
- { url = "https://files.pythonhosted.org/packages/ce/ea/4fdb09f2165ce1365c9eaefef36625583371ee514db58dc9b65d3a255c4c/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:156df9667ad9f2ad26255926524e1c136d6664b741547deb0a86a9acf5ea631f", size = 2342465 },
- { url = "https://files.pythonhosted.org/packages/22/82/6edc3fc42fe9284aead511394bac167693fb2b0e0395b28b8bedaa07ef04/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:dea827b4d55ee390dc89b2afe5927d4308a8b538ae91d9c6f7a5090f397af1aa", size = 2267414 },
- { url = "https://files.pythonhosted.org/packages/59/fe/aae679b64363eb78326c7fdc9d06ec3de18bac68be4b612fc1fe8902693c/pycryptodome-3.23.0-cp37-abi3-win32.whl", hash = "sha256:507dbead45474b62b2bbe318eb1c4c8ee641077532067fec9c1aa82c31f84886", size = 1768484 },
- { url = "https://files.pythonhosted.org/packages/54/2f/e97a1b8294db0daaa87012c24a7bb714147c7ade7656973fd6c736b484ff/pycryptodome-3.23.0-cp37-abi3-win_amd64.whl", hash = "sha256:c75b52aacc6c0c260f204cbdd834f76edc9fb0d8e0da9fbf8352ef58202564e2", size = 1799636 },
- { url = "https://files.pythonhosted.org/packages/18/3d/f9441a0d798bf2b1e645adc3265e55706aead1255ccdad3856dbdcffec14/pycryptodome-3.23.0-cp37-abi3-win_arm64.whl", hash = "sha256:11eeeb6917903876f134b56ba11abe95c0b0fd5e3330def218083c7d98bbcb3c", size = 1703675 },
-]
-
[[package]]
name = "pydantic"
version = "2.12.5"
diff --git a/webui/Main.py b/webui/Main.py
index 69a82a16..86e46284 100644
--- a/webui/Main.py
+++ b/webui/Main.py
@@ -170,8 +170,13 @@ with lang_col:
)
if selected_language:
code = selected_language.split(" - ")[0].strip()
+ previous_language = st.session_state.get("ui_language", "")
st.session_state["ui_language"] = code
config.ui["language"] = code
+ # 语言切换后需要强制刷新一次,否则部分 Streamlit selectbox 会保留
+ # 切换前的展示文本,出现 provider、视频比例等选项文案混用旧语言。
+ if code != previous_language:
+ st.rerun()
support_locales = [
"zh-CN",
@@ -286,6 +291,44 @@ def tr(key):
loc = locales.get(st.session_state["ui_language"], {})
return loc.get("Translation", {}).get(key, key)
+
+def tr_optional(key):
+ loc = locales.get(st.session_state["ui_language"], {})
+ value = loc.get("Translation", {}).get(key, "")
+ return value if value else ""
+
+
+def get_llm_provider_tips(provider_id, **kwargs):
+ # LLM provider 说明文案统一使用 `llm_provider_tips.<provider_id>` 规则。
+ # 这样新增 provider 时只需要在 locale 中补文案;没有文案时不展示提示块,
+ # 避免 Main.py 里继续堆叠大量中英文硬编码说明。
+ tips = tr_optional(f"llm_provider_tips.{provider_id}")
+ if not tips or not kwargs:
+ return tips
+
+ try:
+ return tips.format(**kwargs)
+ except Exception as e:
+ logger.warning(f"format llm provider tips failed: {provider_id}, {e}")
+ return tips
+
+
+def get_llm_provider_label(provider_id, default_label):
+ return tr_optional(f"llm_provider_label.{provider_id}") or default_label
+
+
+def get_tts_provider_tips(provider_id):
+ return tr_optional(f"tts_provider_tips.{provider_id}")
+
+
+def localized_widget_key(name, *parts):
+ # 部分 Streamlit selectbox 使用稳定 key 记住选择状态,但展示文本来自 locale。
+ # 语言切换时把语言也放进 key,可以强制重建控件,避免选中项仍显示旧语言。
+ language = st.session_state.get("ui_language", config.ui.get("language", ""))
+ suffix_parts = [name, language, *[str(part) for part in parts if part]]
+ return "_".join(suffix_parts)
+
+
@st.cache_data(ttl=300, show_spinner=False)
def get_groq_model_ids(api_key: str, base_url: str) -> list[str]:
if not api_key:
@@ -345,12 +388,12 @@ if not config.app.get("hide_config", False):
# 下拉框展示文本和后端 provider id 分开维护,避免 UI 文案变化
# 污染 `config.app["llm_provider"]` 这类稳定配置值。
llm_provider_options = [
+ ("Kimi/Moonshot", "moonshot"),
("OpenAI", "openai"),
("AIHubMix", "aihubmix"),
("AIML API", "aimlapi"),
("EvoLink", "evolink"),
("VolcEngine", "volcengine"),
- ("Moonshot", "moonshot"),
("Azure", "azure"),
("Qwen", "qwen"),
("DeepSeek", "deepseek"),
@@ -359,7 +402,6 @@ if not config.app.get("hide_config", False):
("Grok", "grok"),
("Groq", "groq"),
("Ollama", "ollama"),
- ("G4f", "g4f"),
("OneAPI", "oneapi"),
("Cloudflare", "cloudflare"),
("ERNIE", "ernie"),
@@ -370,29 +412,31 @@ if not config.app.get("hide_config", False):
]
llm_provider_ids = [provider_id for _, provider_id in llm_provider_options]
llm_provider_labels = {
- provider_id: label for label, provider_id in llm_provider_options
+ provider_id: get_llm_provider_label(provider_id, label)
+ for label, provider_id in llm_provider_options
}
- saved_llm_provider = config.app.get("llm_provider", "openai").lower()
+ saved_llm_provider = config.app.get("llm_provider", "moonshot").lower()
if saved_llm_provider not in llm_provider_ids:
- saved_llm_provider = "openai"
+ saved_llm_provider = "moonshot"
# Streamlit 会把没有 key 的 selectbox 视为一个由 label/options/index
# 共同决定的临时控件。如果每次选择后都根据 config.app 重新计算 index,
# 用户第一次切换 provider 后控件可能被重建,表现为“必须选择两次才生效”。
# 这里用稳定的 provider id 作为真实选项,并给控件固定 key;展示文案只
# 通过 format_func 转换,避免 UI 文案变化影响状态。
- if st.session_state.get("llm_provider_select") not in (
+ llm_provider_select_key = localized_widget_key("llm_provider_select")
+ if st.session_state.get(llm_provider_select_key) not in (
None,
*llm_provider_ids,
):
- del st.session_state["llm_provider_select"]
+ del st.session_state[llm_provider_select_key]
llm_provider = st.selectbox(
tr("LLM Provider"),
options=llm_provider_ids,
index=llm_provider_ids.index(saved_llm_provider),
format_func=lambda provider_id: llm_provider_labels[provider_id],
- key="llm_provider_select",
+ key=llm_provider_select_key,
)
llm_helper = st.container()
config.app["llm_provider"] = llm_provider
@@ -405,259 +449,105 @@ if not config.app.get("hide_config", False):
llm_model_name = config.app.get(f"{llm_provider}_model_name", "")
llm_account_id = config.app.get(f"{llm_provider}_account_id", "")
- tips = ""
+ provider_tip_context = {}
if llm_provider == "ollama":
if not llm_model_name:
llm_model_name = "qwen:7b"
if not llm_base_url:
llm_base_url = config.get_default_ollama_base_url()
-
- with llm_helper:
- docker_hint = ""
- if config.is_running_in_container():
- docker_hint = "\n > 检测到容器环境,未配置 Base Url 时会默认使用 `http://host.docker.internal:11434/v1`\n"
- tips = f"""
- ##### Ollama配置说明
- - **API Key**: 随便填写,比如 123
- - **Base Url**: 一般为 http://localhost:11434/v1
- - 如果 `MoneyPrinterTurbo` 和 `Ollama` **不在同一台机器上**,需要填写 `Ollama` 机器的IP地址
- - 如果 `MoneyPrinterTurbo` 是 `Docker` 部署,建议填写 `http://host.docker.internal:11434/v1`{docker_hint}
- - **Model Name**: 使用 `ollama list` 查看,比如 `qwen:7b`
- """
+ docker_hint = ""
+ if config.is_running_in_container():
+ docker_hint = tr_optional("llm_provider_tips.ollama.docker_hint")
+ provider_tip_context["docker_hint"] = docker_hint
if llm_provider == "openai":
if not llm_model_name:
llm_model_name = "gpt-3.5-turbo"
- with llm_helper:
- tips = """
- ##### OpenAI 配置说明
- > 需要VPN开启全局流量模式
- - **API Key**: [点击到官网申请](https://platform.openai.com/api-keys)
- - **Base Url**: 官方 OpenAI 可留空;如果使用 OpenAI 兼容供应商(例如 OpenRouter),请填写对应的兼容接口地址
- - **Model Name**: 填写**有权限**的模型;如果使用兼容供应商,请填写该平台支持的模型 ID
- """
if llm_provider == "aihubmix":
if not llm_model_name:
llm_model_name = "gpt-5.4-mini"
if not llm_base_url:
llm_base_url = "https://aihubmix.com/v1"
- with llm_helper:
- tips = """
- ##### AIHubMix 配置说明
- - **API Key**: 在 AIHubMix 控制台创建 API Key
- - **Base Url**: 预填 https://aihubmix.com/v1
- - **Model Name**: 默认 gpt-5.4-mini,也可以填写 AIHubMix 支持的其它模型 ID
- """
if llm_provider == "aimlapi":
if not llm_model_name:
llm_model_name = "openai/gpt-4o-mini"
if not llm_base_url:
llm_base_url = "https://api.aimlapi.com/v1"
- with llm_helper:
- tips = """
- ##### AIML API Configuration
- - **API Key**: create one at https://aimlapi.com/app/keys
- - **Base Url**: https://api.aimlapi.com/v1
- - **Model Name**: for example `openai/gpt-4o-mini`, `openai/gpt-4o`, `anthropic/claude-sonnet-4.5`, or `google/gemini-3-flash-preview`
- """
if llm_provider == "evolink":
if not llm_model_name:
llm_model_name = "gpt-5.5"
if not llm_base_url:
llm_base_url = "https://direct.evolink.ai/v1"
- with llm_helper:
- tips = """
- ##### EvoLink 配置说明
- - **API Key**: [点击到官网申请](https://evolink.ai/dashboard/keys)
- - **Base Url**: 默认 https://direct.evolink.ai/v1
- - **Model Name**: 默认 gpt-5.5,也可以填写 EvoLink 支持的其它模型 ID
- """
if llm_provider == "volcengine":
if not llm_model_name:
llm_model_name = "doubao-seed-2-1-turbo-260628"
if not llm_base_url:
llm_base_url = "https://ark.cn-beijing.volces.com/api/v3"
- with llm_helper:
- tips = """
- ##### VolcEngine Ark 配置说明
- - **注册链接**: [点击注册 火山引擎](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=MoneyPrinterTurbo)
- - **API Key**: 在火山引擎方舟控制台创建 API Key
- - **Base Url**: 默认 https://ark.cn-beijing.volces.com/api/v3
- - **Model Name**: 填写 Ark 控制台已开通的模型 ID,例如 doubao-seed-2-1-turbo-260628
- """
if llm_provider == "moonshot":
if not llm_model_name:
- llm_model_name = "moonshot-v1-8k"
- with llm_helper:
- tips = """
- ##### Moonshot 配置说明
- - **API Key**: [点击到官网申请](https://platform.moonshot.cn/console/api-keys)
- - **Base Url**: 固定为 https://api.moonshot.cn/v1
- - **Model Name**: 比如 moonshot-v1-8k,[点击查看模型列表](https://platform.moonshot.cn/docs/intro#%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8)
- """
+ llm_model_name = "kimi-k2.7-code"
+
if llm_provider == "oneapi":
if not llm_model_name:
llm_model_name = (
"claude-3-5-sonnet-20240620" # 默认模型,可以根据需要调整
)
- with llm_helper:
- tips = """
- ##### OneAPI 配置说明
- - **API Key**: 填写您的 OneAPI 密钥
- - **Base Url**: 填写 OneAPI 的基础 URL
- - **Model Name**: 填写您要使用的模型名称,例如 claude-3-5-sonnet-20240620
- """
if llm_provider == "qwen":
if not llm_model_name:
llm_model_name = "qwen-max"
- with llm_helper:
- tips = """
- ##### 通义千问Qwen 配置说明
- - **API Key**: [点击到官网申请](https://dashscope.console.aliyun.com/apiKey)
- - **Base Url**: 留空
- - **Model Name**: 比如 qwen-max,[点击查看模型列表](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction#3ef6d0bcf91wy)
- """
-
- if llm_provider == "g4f":
- if not llm_model_name:
- llm_model_name = "gpt-3.5-turbo"
- with llm_helper:
- tips = """
- ##### gpt4free 配置说明
- > [GitHub开源项目](https://github.com/xtekky/gpt4free),可以免费使用GPT模型,但是**稳定性较差**
- - **API Key**: 随便填写,比如 123
- - **Base Url**: 留空
- - **Model Name**: 比如 gpt-3.5-turbo,[点击查看模型列表](https://github.com/xtekky/gpt4free/blob/main/g4f/models.py#L308)
- """
- if llm_provider == "azure":
- with llm_helper:
- tips = """
- ##### Azure 配置说明
- > [点击查看如何部署模型](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/how-to/create-resource)
- - **API Key**: [点击到Azure后台创建](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI)
- - **Base Url**: 留空
- - **Model Name**: 填写你实际的部署名
- """
if llm_provider == "gemini":
if not llm_model_name:
llm_model_name = "gemini-1.0-pro"
- with llm_helper:
- tips = """
- ##### Gemini 配置说明
- > 需要VPN开启全局流量模式
- - **API Key**: [点击到官网申请](https://ai.google.dev/)
- - **Base Url**: 留空
- - **Model Name**: 比如 gemini-1.0-pro
- """
-
if llm_provider == "grok":
if not llm_model_name:
llm_model_name = "grok-4.3"
if not llm_base_url:
llm_base_url = "https://api.x.ai/v1"
- with llm_helper:
- tips = """
- ##### Grok 配置说明
- - **API Key**: 填写您的 GrokAPI 密钥
- - **Base Url**: 填写 GrokAPI 的基础 URL
- - **Model Name**: 比如 grok-4.3
- """
-
if llm_provider == "groq":
if not llm_model_name:
llm_model_name = "llama-3.3-70b-versatile"
if not llm_base_url:
llm_base_url = "https://api.groq.com/openai/v1"
- with llm_helper:
- tips = """
- ##### Groq 配置说明
- - **API Key**: [点击到官网申请](https://console.groq.com/keys)
- - **Base Url**: 固定为 https://api.groq.com/openai/v1
- - **Model Name**: 比如 llama-3.3-70b-versatile
- """
-
if llm_provider == "deepseek":
if not llm_model_name:
llm_model_name = "deepseek-chat"
if not llm_base_url:
llm_base_url = "https://api.deepseek.com"
- with llm_helper:
- tips = """
- ##### DeepSeek 配置说明
- - **API Key**: [点击到官网申请](https://platform.deepseek.com/api_keys)
- - **Base Url**: 固定为 https://api.deepseek.com
- - **Model Name**: 固定为 deepseek-chat
- """
if llm_provider == "mimo":
if not llm_model_name:
llm_model_name = "mimo-v2.5-pro"
if not llm_base_url:
llm_base_url = "https://api.xiaomimimo.com/v1"
- with llm_helper:
- tips = """
- ##### Xiaomi MiMo 配置说明
- - **API Key**: [点击到官网申请](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)
- - **Base Url**: 固定为 https://api.xiaomimimo.com/v1
- - **Model Name**: 默认 mimo-v2.5-pro,也可以按官方文档填写其它可用模型
- """
if llm_provider == "modelscope":
if not llm_model_name:
llm_model_name = "Qwen/Qwen3-32B"
if not llm_base_url:
llm_base_url = "https://api-inference.modelscope.cn/v1/"
- with llm_helper:
- tips = """
- ##### ModelScope 配置说明
- - **API Key**: [点击到官网申请](https://modelscope.cn/docs/model-service/API-Inference/intro)
- - **Base Url**: 固定为 https://api-inference.modelscope.cn/v1/
- - **Model Name**: 比如 Qwen/Qwen3-32B,[点击查看模型列表](https://modelscope.cn/models?filter=inference_type&page=1)
- """
-
- if llm_provider == "ernie":
- with llm_helper:
- tips = """
- ##### 百度文心一言 配置说明
- - **API Key**: [点击到官网申请](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)
- - **Secret Key**: [点击到官网申请](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)
- - **Base Url**: 填写 **请求地址** [点击查看文档](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E)
- """
if llm_provider == "pollinations":
if not llm_model_name:
llm_model_name = "default"
- with llm_helper:
- tips = """
- ##### Pollinations AI Configuration
- - **API Key**: Optional - Leave empty for public access
- - **Base Url**: Default is https://text.pollinations.ai/openai
- - **Model Name**: Use 'openai-fast' or specify a model name
- """
if llm_provider == "litellm":
if not llm_model_name:
llm_model_name = "openai/gpt-4o-mini"
+
+ tips = get_llm_provider_tips(llm_provider, **provider_tip_context)
+ if tips:
with llm_helper:
- tips = """
- ##### LiteLLM Configuration
- > [LiteLLM](https://github.com/BerriAI/litellm) routes to 100+ LLM providers via a unified interface.
- > Set your provider's API key as an env var: `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, `AWS_ACCESS_KEY_ID`, etc.
- - **Model Name**: LiteLLM format — `openai/gpt-4o`, `anthropic/claude-sonnet-4-20250514`, `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0`, `gemini/gemini-2.5-flash`. See [full provider list](https://docs.litellm.ai/docs/providers)
- """
-
- if tips and config.ui["language"] == "zh":
- st.info(tips)
+ st.info(tips)
st_llm_api_key = st.text_input(
tr("API Key"), value=llm_api_key, type="password"
@@ -691,13 +581,9 @@ if not config.app.get("hide_config", False):
key="groq_model_name_input",
)
if effective_api_key:
- st.caption(
- "Unable to load Groq model list right now. You can still enter a model name manually — note it won't be validated until generation."
- )
+ st.caption(tr("Groq Model List Load Failed"))
else:
- st.caption(
- "Add a Groq API key to load available models automatically."
- )
+ st.caption(tr("Groq API Key Required for Model List"))
else:
st_llm_model_name = st.text_input(
tr("Model Name"),
@@ -976,7 +862,7 @@ with middle_panel:
0
], # The label is displayed to the user
index=default_aspect_index,
- key=f"video_aspect_for_{params.video_source}",
+ key=localized_widget_key("video_aspect_for", params.video_source),
)
params.video_aspect = VideoAspect(video_aspect_ratios[selected_index][1])
@@ -1256,15 +1142,9 @@ with middle_panel:
)
# 显示硅基流动的说明信息
- st.info(
- tr("SiliconFlow TTS Settings")
- + ":\n"
- + "- "
- + tr("Speed: Range [0.25, 4.0], default is 1.0")
- + "\n"
- + "- "
- + tr("Volume: Uses Speech Volume setting, default 1.0 maps to gain 0")
- )
+ tips = get_tts_provider_tips("siliconflow")
+ if tips:
+ st.info(tips)
config.siliconflow["api_key"] = siliconflow_api_key
@@ -1282,15 +1162,9 @@ with middle_panel:
key="mimo_tts_api_key_input",
)
- st.info(
- tr("MiMo TTS Settings")
- + ":\n"
- + "- "
- + tr("Uses Xiaomi MiMo V2.5 TTS preset voices")
- + "\n"
- + "- "
- + tr("Speed and volume are currently handled by the provider defaults")
- )
+ tips = get_tts_provider_tips("mimo")
+ if tips:
+ st.info(tips)
config.app["mimo_api_key"] = mimo_api_key
@@ -1325,11 +1199,9 @@ with middle_panel:
)
config.elevenlabs["model_id"] = elevenlabs_model
- st.info(
- "ElevenLabs TTS Settings:\n"
- "- Get your API key at https://elevenlabs.io/app/settings/api-keys\n"
- "- Mark voices as ★ Favorite in the ElevenLabs voice library to make them appear here"
- )
+ tips = get_tts_provider_tips("elevenlabs")
+ if tips:
+ st.info(tips)
if elevenlabs_api_key != saved_elevenlabs_api_key:
for k in list(st.session_state.keys()):
@@ -1346,7 +1218,7 @@ with middle_panel:
tr("Chatterbox Base URL"),
value=config.chatterbox.get("base_url") or DEFAULT_CHATTERBOX_BASE_URL,
key="chatterbox_base_url_input",
- placeholder="http://localhost:4123/v1",
+ placeholder=tr("Chatterbox Base URL Placeholder"),
)
config.chatterbox["base_url"] = (chatterbox_base_url or "").strip()
@@ -1377,21 +1249,13 @@ with middle_panel:
tr("Chatterbox Voices"),
value=str(_saved_chatterbox_voices or ""),
key="chatterbox_voices_input",
- placeholder="default-Female, narrator-Male",
+ placeholder=tr("Chatterbox Voices Placeholder"),
)
config.chatterbox["voices"] = _parse_chatterbox_voices(chatterbox_voices)
- st.info(
- "Chatterbox TTS Settings (self-hosted):\n"
- "- Run an OpenAI-compatible Chatterbox server (e.g. "
- "devnen/Chatterbox-TTS-Server or travisvn/chatterbox-tts-api) and "
- "set Base URL to its /v1 endpoint\n"
- "- Voices is a comma-separated list of voice names your server "
- "exposes; add a -Female or -Male suffix only to label the gender "
- "in this dropdown\n"
- "- Speech Volume is not applied for Chatterbox (the OpenAI "
- "/audio/speech API has no volume field); use Speech Rate instead"
- )
+ tips = get_tts_provider_tips("chatterbox")
+ if tips:
+ st.info(tips)
params.voice_volume = st.selectbox(
tr("Speech Volume"),
diff --git a/webui/i18n/de.json b/webui/i18n/de.json
index 0e4f6b2d..19186870 100644
--- a/webui/i18n/de.json
+++ b/webui/i18n/de.json
@@ -120,15 +120,9 @@
"TTS Servers": "TTS-Server",
"No voices available for the selected TTS server. Please select another server.": "Keine Stimmen für den ausgewählten TTS-Server verfügbar. Bitte wählen Sie einen anderen Server.",
"SiliconFlow API Key": "SiliconFlow API-Schlüssel",
- "SiliconFlow TTS Settings": "SiliconFlow TTS-Einstellungen",
- "Speed: Range [0.25, 4.0], default is 1.0": "Geschwindigkeit: Bereich [0.25, 4.0], Standardwert ist 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Lautstärke: Verwendet die Sprachlautstärke-Einstellung, Standardwert 1.0 entspricht Verstärkung 0",
"MiMo API Key": "Xiaomi-MiMo-API-Schlüssel [Hier abrufen](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Xiaomi-MiMo-TTS-Einstellungen",
"ElevenLabs API Key": "ElevenLabs API-Schlüssel",
"ElevenLabs Model": "ElevenLabs-Modell",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Verwendet voreingestellte Xiaomi-MiMo-V2.5-TTS-Stimmen",
- "Speed and volume are currently handled by the provider defaults": "Geschwindigkeit und Lautstärke werden derzeit durch die Standardwerte des Anbieters gesteuert",
"Hide Log": "Protokoll ausblenden",
"Hide Basic Settings": "Basis-Einstellungen ausblenden\n\nWenn diese Option deaktiviert ist, wird die Basis-Einstellungen-Leiste nicht auf der Seite angezeigt.\n\nWenn Sie sie erneut anzeigen möchten, setzen Sie `hide_config = false` in `config.toml`",
"LLM Settings": "**LLM-Einstellungen**",
diff --git a/webui/i18n/en.json b/webui/i18n/en.json
index 3732f87d..176df6bf 100644
--- a/webui/i18n/en.json
+++ b/webui/i18n/en.json
@@ -94,10 +94,13 @@
"Language": "Language",
"LLM Provider": "LLM Provider",
"Recommended": "Recommended",
+ "llm_provider_label.moonshot": "Kimi/Moonshot (Recommended)",
"API Key": "API Key (:red[Required])",
"Base Url": "Base Url",
"Account ID": "Account ID (Get from Cloudflare dashboard)",
"Model Name": "Model Name",
+ "Groq Model List Load Failed": "Unable to load Groq model list right now. You can still enter a model name manually; it will be validated during generation.",
+ "Groq API Key Required for Model List": "Add a Groq API key to load available models automatically.",
"Secret Key": "Secret Key",
"Please Enter the LLM API Key": "Please Enter the **LLM API Key**",
"Please Enter the Pexels API Key": "Please Enter the **Pexels API Key**",
@@ -119,19 +122,19 @@
"TTS Servers": "TTS Servers",
"No voices available for the selected TTS server. Please select another server.": "No voices available for the selected TTS server. Please select another server.",
"SiliconFlow API Key": "SiliconFlow API Key [Click to get](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "SiliconFlow TTS Settings",
- "Speed: Range [0.25, 4.0], default is 1.0": "Speed: Range [0.25, 4.0], default is 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0",
"MiMo API Key": "Xiaomi MiMo API Key [Click to get](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Xiaomi MiMo TTS Settings",
"ElevenLabs API Key": "ElevenLabs API Key",
"ElevenLabs Model": "ElevenLabs Model",
"Chatterbox Base URL": "Chatterbox Base URL",
"Chatterbox API Key": "Chatterbox API Key",
"Chatterbox Model": "Chatterbox Model",
"Chatterbox Voices": "Chatterbox Voices",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Uses Xiaomi MiMo V2.5 TTS preset voices",
- "Speed and volume are currently handled by the provider defaults": "Speed and volume are currently handled by the provider defaults",
+ "Chatterbox Base URL Placeholder": "http://localhost:4123/v1",
+ "Chatterbox Voices Placeholder": "default-Female, narrator-Male",
+ "tts_provider_tips.siliconflow": "##### SiliconFlow TTS Settings\n- **Speed**: range [0.25, 4.0], default is 1.0\n- **Volume**: uses the Speech Volume setting; default 1.0 maps to gain 0",
+ "tts_provider_tips.mimo": "##### Xiaomi MiMo TTS Settings\n- Uses Xiaomi MiMo V2.5 preset voices\n- Speed and volume are currently handled by the provider defaults",
+ "tts_provider_tips.elevenlabs": "##### ElevenLabs TTS Settings\n- **API Key**: create one at https://elevenlabs.io/app/settings/api-keys\n- Mark voices as Favorite in the ElevenLabs voice library to make them appear here",
+ "tts_provider_tips.chatterbox": "##### Chatterbox TTS Settings (self-hosted)\n- Run an OpenAI-compatible Chatterbox server, such as devnen/Chatterbox-TTS-Server or travisvn/chatterbox-tts-api, and set Base URL to its /v1 endpoint\n- Voices is a comma-separated list of voice names exposed by your server; add a -Female or -Male suffix only to label the gender in this dropdown\n- Speech Volume is not applied for Chatterbox because the OpenAI /audio/speech API has no volume field; use Speech Rate instead",
"Hide Log": "Hide Log",
"Hide Basic Settings": "Hide Basic Settings\n\nHidden, the basic settings panel will not be displayed on the page.\n\nIf you need to display it again, please set `hide_config = false` in `config.toml`",
"LLM Settings": "**LLM Settings**",
@@ -168,6 +171,26 @@
"Coverr API Key deleted successfully": "Coverr API Key deleted successfully",
"Advanced Video Settings": "Advanced Video Settings",
"Video Encoder": "Video Encoder",
- "Video Encoder Help": "Advanced option. libx264 is the safest default. When a hardware encoder is selected, the app falls back to libx264 if the current FFmpeg, GPU, or driver cannot use it."
+ "Video Encoder Help": "Advanced option. libx264 is the safest default. When a hardware encoder is selected, the app falls back to libx264 if the current FFmpeg, GPU, or driver cannot use it.",
+ "llm_provider_tips.ollama": "##### Ollama Configuration\n- **API Key**: enter any value, for example `123`\n- **Base Url**: usually http://localhost:11434/v1\n - If `MoneyPrinterTurbo` and `Ollama` are **not on the same machine**, use the IP address of the Ollama machine\n - If `MoneyPrinterTurbo` runs in `Docker`, use `http://host.docker.internal:11434/v1` when available{docker_hint}\n- **Model Name**: run `ollama list`, for example `qwen:7b`",
+ "llm_provider_tips.ollama.docker_hint": "\n > Container environment detected. If Base Url is empty, `http://host.docker.internal:11434/v1` is used by default.\n",
+ "llm_provider_tips.openai": "##### OpenAI Configuration\n> A global VPN/proxy may be required in some regions\n- **API Key**: [create one on the OpenAI platform](https://platform.openai.com/api-keys)\n- **Base Url**: leave empty for official OpenAI; set a compatible endpoint when using an OpenAI-compatible provider such as OpenRouter\n- **Model Name**: use a model you have access to; for compatible providers, enter the model ID supported by that platform",
+ "llm_provider_tips.aihubmix": "##### AIHubMix Configuration\n- **API Key**: create one in the AIHubMix console\n- **Base Url**: https://aihubmix.com/v1\n- **Model Name**: defaults to gpt-5.4-mini; you can also use other model IDs supported by AIHubMix",
+ "llm_provider_tips.aimlapi": "##### AIML API Configuration\n- **API Key**: [create one at AIML API](https://aimlapi.com/app/keys)\n- **Base Url**: https://api.aimlapi.com/v1\n- **Model Name**: for example `openai/gpt-4o-mini`, `openai/gpt-4o`, `anthropic/claude-sonnet-4.5`, or `google/gemini-3-flash-preview`",
+ "llm_provider_tips.evolink": "##### EvoLink Configuration\n- **API Key**: [create one on EvoLink](https://evolink.ai/dashboard/keys)\n- **Base Url**: https://direct.evolink.ai/v1\n- **Model Name**: defaults to gpt-5.5; you can also use other model IDs supported by EvoLink",
+ "llm_provider_tips.volcengine": "##### VolcEngine Ark Configuration\n- **Sign up**: [register on VolcEngine](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=MoneyPrinterTurbo)\n- **API Key**: create one in the VolcEngine Ark console\n- **Base Url**: https://ark.cn-beijing.volces.com/api/v3\n- **Model Name**: enter an enabled model ID from the Ark console, for example doubao-seed-2-1-turbo-260628",
+ "llm_provider_tips.moonshot": "##### Kimi / Moonshot Configuration\n- **API Key**: [create one on the Kimi Open Platform](https://platform.kimi.ai/console/api-keys?aff=MoneyPrinterTurbo)\n- **Base Url**: https://api.moonshot.cn/v1\n- **Model Name**: defaults to `kimi-k2.7-code`; see the [model list](https://platform.kimi.ai/docs/models?aff=MoneyPrinterTurbo)\n\nWhy recommended:\n- **Fits the video creation workflow**: helps generate scripts, extract stock-footage search keywords, and improve final footage relevance\n- **Strong long-context capability**: useful for longer topics, batch scripts, and complex prompts\n- **Flexible billing**: pay only for what you use, with transparent costs",
+ "llm_provider_tips.oneapi": "##### OneAPI Configuration\n- **API Key**: enter your OneAPI key\n- **Base Url**: enter your OneAPI base URL\n- **Model Name**: enter the model name you want to use, for example claude-3-5-sonnet-20240620",
+ "llm_provider_tips.qwen": "##### Qwen Configuration\n- **API Key**: [create one on DashScope](https://dashscope.console.aliyun.com/apiKey)\n- **Base Url**: leave empty\n- **Model Name**: for example qwen-max; see the [model list](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction#3ef6d0bcf91wy)",
+ "llm_provider_tips.azure": "##### Azure Configuration\n> [Learn how to deploy a model](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource)\n- **API Key**: create one in the [Azure portal](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI)\n- **Base Url**: leave empty\n- **Model Name**: enter your deployment name",
+ "llm_provider_tips.gemini": "##### Gemini Configuration\n> A global VPN/proxy may be required in some regions\n- **API Key**: [create one on Google AI Studio](https://ai.google.dev/)\n- **Base Url**: leave empty\n- **Model Name**: for example gemini-1.0-pro",
+ "llm_provider_tips.grok": "##### Grok Configuration\n- **API Key**: enter your Grok API key\n- **Base Url**: enter your Grok API base URL\n- **Model Name**: for example grok-4.3",
+ "llm_provider_tips.groq": "##### Groq Configuration\n- **API Key**: [create one on Groq](https://console.groq.com/keys)\n- **Base Url**: https://api.groq.com/openai/v1\n- **Model Name**: for example llama-3.3-70b-versatile",
+ "llm_provider_tips.deepseek": "##### DeepSeek Configuration\n- **API Key**: [create one on DeepSeek](https://platform.deepseek.com/api_keys)\n- **Base Url**: https://api.deepseek.com\n- **Model Name**: deepseek-chat",
+ "llm_provider_tips.mimo": "##### Xiaomi MiMo Configuration\n- **API Key**: [create one in Xiaomi MiMo](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)\n- **Base Url**: https://api.xiaomimimo.com/v1\n- **Model Name**: defaults to mimo-v2.5-pro; you can also use other available models from the official docs",
+ "llm_provider_tips.modelscope": "##### ModelScope Configuration\n- **API Key**: [create one on ModelScope](https://modelscope.cn/docs/model-service/API-Inference/intro)\n- **Base Url**: https://api-inference.modelscope.cn/v1/\n- **Model Name**: for example Qwen/Qwen3-32B; see the [model list](https://modelscope.cn/models?filter=inference_type&page=1)",
+ "llm_provider_tips.ernie": "##### ERNIE Configuration\n- **API Key**: [create one in Baidu Qianfan](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Secret Key**: [create one in Baidu Qianfan](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Base Url**: enter the request URL; see the [documentation](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E)",
+ "llm_provider_tips.pollinations": "##### Pollinations AI Configuration\n- **API Key**: optional; leave empty for public access\n- **Base Url**: https://text.pollinations.ai/openai\n- **Model Name**: use `openai-fast` or specify another model name",
+ "llm_provider_tips.litellm": "##### LiteLLM Configuration\n> [LiteLLM](https://github.com/BerriAI/litellm) routes to 100+ LLM providers through a unified interface.\n> Set your provider API key as an environment variable, such as `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, or `AWS_ACCESS_KEY_ID`.\n- **Model Name**: use LiteLLM format, for example `openai/gpt-4o`, `anthropic/claude-sonnet-4-20250514`, `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0`, or `gemini/gemini-2.5-flash`. See the [full provider list](https://docs.litellm.ai/docs/providers)"
}
}
diff --git a/webui/i18n/es.json b/webui/i18n/es.json
index 1a5c79a4..4b03a3b2 100644
--- a/webui/i18n/es.json
+++ b/webui/i18n/es.json
@@ -119,19 +119,13 @@
"TTS Servers": "Servidores TTS",
"No voices available for the selected TTS server. Please select another server.": "No hay voces disponibles para el servidor TTS seleccionado. Selecciona otro servidor.",
"SiliconFlow API Key": "SiliconFlow API Key [Haz clic para obtener](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "Configuración TTS de SiliconFlow",
- "Speed: Range [0.25, 4.0], default is 1.0": "Velocidad: Rango [0.25, 4.0], el valor predeterminado es 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Volumen: Usa la configuración de volumen de voz, 1.0 predeterminado equivale a ganancia 0",
"MiMo API Key": "Xiaomi MiMo API Key [Haz clic para obtener](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Configuración TTS de Xiaomi MiMo",
"ElevenLabs API Key": "Clave API de ElevenLabs",
"ElevenLabs Model": "Modelo de ElevenLabs",
"Chatterbox API Key": "Clave API de Chatterbox",
"Chatterbox Base URL": "URL base de Chatterbox",
"Chatterbox Model": "Modelo de Chatterbox",
"Chatterbox Voices": "Voces de Chatterbox",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Usa voces preestablecidas de TTS Xiaomi MiMo V2.5",
- "Speed and volume are currently handled by the provider defaults": "La velocidad y el volumen están gestionados por los valores predeterminados del proveedor",
"Hide Log": "Ocultar registro",
"Hide Basic Settings": "Ocultar configuración básica\n\nOculto, el panel de configuración básica no se mostrará en la página.\n\nSi necesitas mostrarlo de nuevo, establece `hide_config = false` en `config.toml`",
"LLM Settings": "**Configuración LLM**",
diff --git a/webui/i18n/id.json b/webui/i18n/id.json
index 59532979..d84f2a9b 100644
--- a/webui/i18n/id.json
+++ b/webui/i18n/id.json
@@ -119,15 +119,9 @@
"TTS Servers": "Server TTS",
"No voices available for the selected TTS server. Please select another server.": "Tidak ada suara yang tersedia untuk server TTS yang dipilih. Silakan pilih server lain.",
"SiliconFlow API Key": "Kunci API SiliconFlow [Klik untuk mendapatkan](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "Pengaturan TTS SiliconFlow",
- "Speed: Range [0.25, 4.0], default is 1.0": "Kecepatan: Rentang [0.25, 4.0], default adalah 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Volume: Menggunakan pengaturan Volume Ucapan, default 1.0 dipetakan ke gain 0",
"MiMo API Key": "Kunci API Xiaomi MiMo [Klik untuk mendapatkan](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Pengaturan TTS Xiaomi MiMo",
"ElevenLabs API Key": "Kunci API ElevenLabs",
"ElevenLabs Model": "Model ElevenLabs",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Menggunakan suara preset TTS Xiaomi MiMo V2.5",
- "Speed and volume are currently handled by the provider defaults": "Kecepatan dan volume saat ini ditangani oleh default penyedia",
"Hide Log": "Sembunyikan Log",
"Hide Basic Settings": "Sembunyikan Pengaturan Dasar\n\nTersembunyi, panel pengaturan dasar tidak akan ditampilkan di halaman.\n\nJika Anda perlu menampilkannya lagi, silakan atur `hide_config = false` di `config.toml`",
"LLM Settings": "**Pengaturan LLM**",
diff --git a/webui/i18n/pt.json b/webui/i18n/pt.json
index f4a6faa0..75cd3552 100644
--- a/webui/i18n/pt.json
+++ b/webui/i18n/pt.json
@@ -106,11 +106,8 @@
"TTS Servers": "Servidores TTS",
"No voices available for the selected TTS server. Please select another server.": "Não há vozes disponíveis para o servidor TTS selecionado. Por favor, selecione outro servidor.",
"SiliconFlow API Key": "Chave API do SiliconFlow",
- "SiliconFlow TTS Settings": "Configurações do SiliconFlow TTS",
"ElevenLabs API Key": "Chave API do ElevenLabs",
"ElevenLabs Model": "Modelo ElevenLabs",
- "Speed: Range [0.25, 4.0], default is 1.0": "Velocidade: Intervalo [0.25, 4.0], o padrão é 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Volume: Usa a configuração de Volume de Fala, o padrão 1.0 corresponde ao ganho 0",
"Hide Log": "Ocultar Log",
"Hide Basic Settings": "Ocultar Configurações Básicas\n\nOculto, o painel de configurações básicas não será exibido na página.\n\nSe precisar exibi-lo novamente, defina `hide_config = false` em `config.toml`",
"LLM Settings": "**Configurações do LLM**",
diff --git a/webui/i18n/ru.json b/webui/i18n/ru.json
index 9a2ce862..2ca21c8f 100644
--- a/webui/i18n/ru.json
+++ b/webui/i18n/ru.json
@@ -91,10 +91,13 @@
"Language": "Язык",
"LLM Provider": "Провайдер LLM",
"Recommended": "рекомендуется",
+ "llm_provider_label.moonshot": "Kimi/Moonshot (Recommended)",
"API Key": "API-ключ (:red[обязательно])",
"Base Url": "Базовый URL",
"Account ID": "ID аккаунта (см. в панели Cloudflare)",
"Model Name": "Модель",
+ "Groq Model List Load Failed": "Unable to load Groq model list right now. You can still enter a model name manually; it will be validated during generation.",
+ "Groq API Key Required for Model List": "Add a Groq API key to load available models automatically.",
"Secret Key": "Секретный ключ",
"Please Enter the LLM API Key": "Введите **API-ключ LLM**",
"Please Enter the Pexels API Key": "Введите **API-ключ Pexels**",
@@ -115,19 +118,19 @@
"TTS Servers": "Сервис озвучки",
"No voices available for the selected TTS server. Please select another server.": "В выбранном сервисе озвучки нет доступных голосов. Выберите другой сервис.",
"SiliconFlow API Key": "API-ключ SiliconFlow [получить](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "Настройки TTS SiliconFlow",
- "Speed: Range [0.25, 4.0], default is 1.0": "Скорость: диапазон [0.25, 4.0], по умолчанию 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Громкость: используется настройка громкости озвучки; 1.0 по умолчанию соответствует усилению 0",
"MiMo API Key": "API-ключ Xiaomi MiMo [получить](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Настройки TTS Xiaomi MiMo",
"ElevenLabs API Key": "API-ключ ElevenLabs",
"ElevenLabs Model": "Модель ElevenLabs",
"Chatterbox Base URL": "Базовый URL Chatterbox",
"Chatterbox API Key": "API-ключ Chatterbox",
"Chatterbox Model": "Модель Chatterbox",
"Chatterbox Voices": "Голоса Chatterbox",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Используются предустановленные голоса Xiaomi MiMo V2.5",
- "Speed and volume are currently handled by the provider defaults": "Скорость и громкость сейчас задаются настройками провайдера по умолчанию",
+ "Chatterbox Base URL Placeholder": "http://localhost:4123/v1",
+ "Chatterbox Voices Placeholder": "default-Female, narrator-Male",
+ "tts_provider_tips.siliconflow": "##### SiliconFlow TTS Settings\n- **Speed**: range [0.25, 4.0], default is 1.0\n- **Volume**: uses the Speech Volume setting; default 1.0 maps to gain 0",
+ "tts_provider_tips.mimo": "##### Xiaomi MiMo TTS Settings\n- Uses Xiaomi MiMo V2.5 preset voices\n- Speed and volume are currently handled by the provider defaults",
+ "tts_provider_tips.elevenlabs": "##### ElevenLabs TTS Settings\n- **API Key**: create one at https://elevenlabs.io/app/settings/api-keys\n- Mark voices as Favorite in the ElevenLabs voice library to make them appear here",
+ "tts_provider_tips.chatterbox": "##### Chatterbox TTS Settings (self-hosted)\n- Run an OpenAI-compatible Chatterbox server, such as devnen/Chatterbox-TTS-Server or travisvn/chatterbox-tts-api, and set Base URL to its /v1 endpoint\n- Voices is a comma-separated list of voice names exposed by your server; add a -Female or -Male suffix only to label the gender in this dropdown\n- Speech Volume is not applied for Chatterbox because the OpenAI /audio/speech API has no volume field; use Speech Rate instead",
"Hide Log": "Скрыть журнал",
"Hide Basic Settings": "Скрыть основные настройки\n\nПанель основных настроек не будет показана на странице.\n\nЧтобы вернуть ее, установите `hide_config = false` в `config.toml`",
"LLM Settings": "**Настройки LLM**",
@@ -165,6 +168,26 @@
"Advanced Video Settings": "Дополнительные настройки видео",
"Video Encoder": "Видеокодер",
"Video Encoder Help": "Дополнительная настройка. libx264 считается самым надежным вариантом по умолчанию. Если выбран аппаратный кодер, приложение вернется к libx264, если установленная версия FFmpeg, GPU или драйвер не поддерживают выбранный кодер.",
+ "llm_provider_tips.ollama": "##### Ollama Configuration\n- **API Key**: enter any value, for example `123`\n- **Base Url**: usually http://localhost:11434/v1\n - If `MoneyPrinterTurbo` and `Ollama` are **not on the same machine**, use the IP address of the Ollama machine\n - If `MoneyPrinterTurbo` runs in `Docker`, use `http://host.docker.internal:11434/v1` when available{docker_hint}\n- **Model Name**: run `ollama list`, for example `qwen:7b`",
+ "llm_provider_tips.ollama.docker_hint": "\n > Container environment detected. If Base Url is empty, `http://host.docker.internal:11434/v1` is used by default.\n",
+ "llm_provider_tips.openai": "##### OpenAI Configuration\n> A global VPN/proxy may be required in some regions\n- **API Key**: [create one on the OpenAI platform](https://platform.openai.com/api-keys)\n- **Base Url**: leave empty for official OpenAI; set a compatible endpoint when using an OpenAI-compatible provider such as OpenRouter\n- **Model Name**: use a model you have access to; for compatible providers, enter the model ID supported by that platform",
+ "llm_provider_tips.aihubmix": "##### AIHubMix Configuration\n- **API Key**: create one in the AIHubMix console\n- **Base Url**: https://aihubmix.com/v1\n- **Model Name**: defaults to gpt-5.4-mini; you can also use other model IDs supported by AIHubMix",
+ "llm_provider_tips.aimlapi": "##### AIML API Configuration\n- **API Key**: [create one at AIML API](https://aimlapi.com/app/keys)\n- **Base Url**: https://api.aimlapi.com/v1\n- **Model Name**: for example `openai/gpt-4o-mini`, `openai/gpt-4o`, `anthropic/claude-sonnet-4.5`, or `google/gemini-3-flash-preview`",
+ "llm_provider_tips.evolink": "##### EvoLink Configuration\n- **API Key**: [create one on EvoLink](https://evolink.ai/dashboard/keys)\n- **Base Url**: https://direct.evolink.ai/v1\n- **Model Name**: defaults to gpt-5.5; you can also use other model IDs supported by EvoLink",
+ "llm_provider_tips.volcengine": "##### VolcEngine Ark Configuration\n- **Sign up**: [register on VolcEngine](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=MoneyPrinterTurbo)\n- **API Key**: create one in the VolcEngine Ark console\n- **Base Url**: https://ark.cn-beijing.volces.com/api/v3\n- **Model Name**: enter an enabled model ID from the Ark console, for example doubao-seed-2-1-turbo-260628",
+ "llm_provider_tips.moonshot": "##### Kimi / Moonshot Configuration\n- **API Key**: [create one on the Kimi Open Platform](https://platform.kimi.ai/console/api-keys?aff=MoneyPrinterTurbo)\n- **Base Url**: https://api.moonshot.cn/v1\n- **Model Name**: defaults to `kimi-k2.7-code`; see the [model list](https://platform.kimi.ai/docs/models?aff=MoneyPrinterTurbo)\n\nWhy recommended:\n- **Fits the video creation workflow**: helps generate scripts, extract stock-footage search keywords, and improve final footage relevance\n- **Strong long-context capability**: useful for longer topics, batch scripts, and complex prompts\n- **Flexible billing**: pay only for what you use, with transparent costs",
+ "llm_provider_tips.oneapi": "##### OneAPI Configuration\n- **API Key**: enter your OneAPI key\n- **Base Url**: enter your OneAPI base URL\n- **Model Name**: enter the model name you want to use, for example claude-3-5-sonnet-20240620",
+ "llm_provider_tips.qwen": "##### Qwen Configuration\n- **API Key**: [create one on DashScope](https://dashscope.console.aliyun.com/apiKey)\n- **Base Url**: leave empty\n- **Model Name**: for example qwen-max; see the [model list](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction#3ef6d0bcf91wy)",
+ "llm_provider_tips.azure": "##### Azure Configuration\n> [Learn how to deploy a model](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource)\n- **API Key**: create one in the [Azure portal](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI)\n- **Base Url**: leave empty\n- **Model Name**: enter your deployment name",
+ "llm_provider_tips.gemini": "##### Gemini Configuration\n> A global VPN/proxy may be required in some regions\n- **API Key**: [create one on Google AI Studio](https://ai.google.dev/)\n- **Base Url**: leave empty\n- **Model Name**: for example gemini-1.0-pro",
+ "llm_provider_tips.grok": "##### Grok Configuration\n- **API Key**: enter your Grok API key\n- **Base Url**: enter your Grok API base URL\n- **Model Name**: for example grok-4.3",
+ "llm_provider_tips.groq": "##### Groq Configuration\n- **API Key**: [create one on Groq](https://console.groq.com/keys)\n- **Base Url**: https://api.groq.com/openai/v1\n- **Model Name**: for example llama-3.3-70b-versatile",
+ "llm_provider_tips.deepseek": "##### DeepSeek Configuration\n- **API Key**: [create one on DeepSeek](https://platform.deepseek.com/api_keys)\n- **Base Url**: https://api.deepseek.com\n- **Model Name**: deepseek-chat",
+ "llm_provider_tips.mimo": "##### Xiaomi MiMo Configuration\n- **API Key**: [create one in Xiaomi MiMo](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)\n- **Base Url**: https://api.xiaomimimo.com/v1\n- **Model Name**: defaults to mimo-v2.5-pro; you can also use other available models from the official docs",
+ "llm_provider_tips.modelscope": "##### ModelScope Configuration\n- **API Key**: [create one on ModelScope](https://modelscope.cn/docs/model-service/API-Inference/intro)\n- **Base Url**: https://api-inference.modelscope.cn/v1/\n- **Model Name**: for example Qwen/Qwen3-32B; see the [model list](https://modelscope.cn/models?filter=inference_type&page=1)",
+ "llm_provider_tips.ernie": "##### ERNIE Configuration\n- **API Key**: [create one in Baidu Qianfan](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Secret Key**: [create one in Baidu Qianfan](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Base Url**: enter the request URL; see the [documentation](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E)",
+ "llm_provider_tips.pollinations": "##### Pollinations AI Configuration\n- **API Key**: optional; leave empty for public access\n- **Base Url**: https://text.pollinations.ai/openai\n- **Model Name**: use `openai-fast` or specify another model name",
+ "llm_provider_tips.litellm": "##### LiteLLM Configuration\n> [LiteLLM](https://github.com/BerriAI/litellm) routes to 100+ LLM providers through a unified interface.\n> Set your provider API key as an environment variable, such as `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `GEMINI_API_KEY`, or `AWS_ACCESS_KEY_ID`.\n- **Model Name**: use LiteLLM format, for example `openai/gpt-4o`, `anthropic/claude-sonnet-4-20250514`, `bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0`, or `gemini/gemini-2.5-flash`. See the [full provider list](https://docs.litellm.ai/docs/providers)",
"Custom Position (% from top)": "Пользовательское положение (% от верхнего края)",
"Please enter a value between 0 and 100": "Введите значение от 0 до 100",
"Please enter a valid number": "Введите корректное число",
diff --git a/webui/i18n/tr.json b/webui/i18n/tr.json
index 7d212073..1e0de35b 100644
--- a/webui/i18n/tr.json
+++ b/webui/i18n/tr.json
@@ -115,15 +115,9 @@
"TTS Servers": "TTS Sunucuları",
"No voices available for the selected TTS server. Please select another server.": "Seçilen TTS sunucusu için uygun ses bulunamadı. Lütfen başka bir sunucu seçin.",
"SiliconFlow API Key": "SiliconFlow API Anahtarı [Almak için tıklayın](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "SiliconFlow TTS Ayarları",
- "Speed: Range [0.25, 4.0], default is 1.0": "Hız: Aralık [0.25, 4.0], varsayılan 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Ses Seviyesi: Konuşma Ses Seviyesi ayarını kullanır, varsayılan 1.0 gain 0'a eşittir",
"MiMo API Key": "Xiaomi MiMo API Anahtarı [Almak için tıklayın](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Xiaomi MiMo TTS Ayarları",
"ElevenLabs API Key": "ElevenLabs API Anahtarı",
"ElevenLabs Model": "ElevenLabs Modeli",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Xiaomi MiMo V2.5 TTS hazır seslerini kullanır",
- "Speed and volume are currently handled by the provider defaults": "Hız ve ses seviyesi şu anda sağlayıcının varsayılanlarıyla yönetilir",
"Hide Log": "Günlüğü Gizle",
"Hide Basic Settings": "Temel Ayarları Gizle\n\nGizlendiği takdirde, temel ayarlar paneli sayfada görüntülenmeyecektir.\n\nTekrar görüntülemek için `config.toml` dosyasında `hide_config = false` olarak ayarlayın",
"LLM Settings": "**LLM Ayarları**",
diff --git a/webui/i18n/vi.json b/webui/i18n/vi.json
index 9b83b038..6a94745d 100644
--- a/webui/i18n/vi.json
+++ b/webui/i18n/vi.json
@@ -117,15 +117,9 @@
"TTS Servers": "Máy chủ TTS",
"No voices available for the selected TTS server. Please select another server.": "Không có giọng nói nào cho máy chủ TTS đã chọn. Vui lòng chọn máy chủ khác.",
"SiliconFlow API Key": "Khóa API SiliconFlow",
- "SiliconFlow TTS Settings": "Cài đặt SiliconFlow TTS",
- "Speed: Range [0.25, 4.0], default is 1.0": "Tốc độ: Phạm vi [0.25, 4.0], mặc định là 1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "Âm lượng: Sử dụng cài đặt Âm lượng Giọng nói, mặc định 1.0 tương ứng với tăng ích 0",
"MiMo API Key": "Khóa API Xiaomi MiMo [Nhấn để lấy](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "Cài Đặt TTS Xiaomi MiMo",
"ElevenLabs API Key": "Khóa API ElevenLabs",
"ElevenLabs Model": "Mô Hình ElevenLabs",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "Sử dụng các giọng đọc cài sẵn của Xiaomi MiMo V2.5 TTS",
- "Speed and volume are currently handled by the provider defaults": "Tốc độ và âm lượng hiện được xử lý theo mặc định của nhà cung cấp",
"Hide Log": "Ẩn Nhật Ký",
"Hide Basic Settings": "Ẩn Cài Đặt Cơ Bản\n\nẨn, thanh cài đặt cơ bản sẽ không hiển thị trên trang web.\n\nNếu bạn muốn hiển thị lại, vui lòng đặt `hide_config = false` trong `config.toml`",
"LLM Settings": "**Cài Đặt LLM**",
diff --git a/webui/i18n/zh.json b/webui/i18n/zh.json
index cc90b710..75f2dc6a 100644
--- a/webui/i18n/zh.json
+++ b/webui/i18n/zh.json
@@ -94,10 +94,13 @@
"Pixabay API Key": "Pixabay API Key ([点击获取](https://pixabay.com/api/docs/#api_search_videos)) :red[可以不用配置,如果 Pexels 无法使用,再选择Pixabay]",
"LLM Provider": "大模型提供商",
"Recommended": "推荐",
+ "llm_provider_label.moonshot": "Kimi/Moonshot(推荐)",
"API Key": "API Key (:red[必填,需要到大模型提供商的后台申请])",
"Base Url": "Base Url (可选)",
"Account ID": "账户ID (Cloudflare的dash面板url中获取)",
"Model Name": "模型名称 (:blue[需要到大模型提供商的后台确认被授权的模型名称])",
+ "Groq Model List Load Failed": "暂时无法加载 Groq 模型列表。你仍然可以手动输入模型名称,生成时会再进行校验。",
+ "Groq API Key Required for Model List": "填写 Groq API Key 后,可以自动加载可用模型列表。",
"Secret Key": "密钥",
"Please Enter the LLM API Key": "请先填写大模型 **API Key**",
"Please Enter the Pexels API Key": "请先填写 **Pexels API Key**",
@@ -119,15 +122,19 @@
"TTS Servers": "TTS服务器",
"No voices available for the selected TTS server. Please select another server.": "当前选择的TTS服务器没有可用的声音,请选择其他服务器。",
"SiliconFlow API Key": "硅基流动API密钥 [点击获取](https://cloud.siliconflow.cn/account/ak)",
- "SiliconFlow TTS Settings": "硅基流动TTS设置",
- "Speed: Range [0.25, 4.0], default is 1.0": "语速范围 [0.25, 4.0],默认值为1.0",
- "Volume: Uses Speech Volume setting, default 1.0 maps to gain 0": "音量:使用朗读音量设置,默认值1.0对应增益0",
"MiMo API Key": "小米 MiMo API 密钥 [点击获取](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)",
- "MiMo TTS Settings": "小米 MiMo TTS 设置",
"ElevenLabs API Key": "ElevenLabs API 密钥",
"ElevenLabs Model": "ElevenLabs 模型",
- "Uses Xiaomi MiMo V2.5 TTS preset voices": "使用小米 MiMo V2.5 TTS 预置音色",
- "Speed and volume are currently handled by the provider defaults": "语速和音量当前使用服务商默认效果",
+ "Chatterbox Base URL": "Chatterbox Base URL",
+ "Chatterbox API Key": "Chatterbox API Key",
+ "Chatterbox Model": "Chatterbox 模型",
+ "Chatterbox Voices": "Chatterbox 音色",
+ "Chatterbox Base URL Placeholder": "http://localhost:4123/v1",
+ "Chatterbox Voices Placeholder": "default-Female, narrator-Male",
+ "tts_provider_tips.siliconflow": "##### 硅基流动 TTS 设置\n- **语速**: 范围 [0.25, 4.0],默认值为 1.0\n- **音量**: 使用朗读音量设置,默认值 1.0 对应增益 0",
+ "tts_provider_tips.mimo": "##### 小米 MiMo TTS 设置\n- 使用小米 MiMo V2.5 TTS 预置音色\n- 语速和音量当前使用服务商默认效果",
+ "tts_provider_tips.elevenlabs": "##### ElevenLabs TTS 设置\n- **API Key**: 在 https://elevenlabs.io/app/settings/api-keys 创建\n- 在 ElevenLabs voice library 中将声音标记为 Favorite 后,会显示在这里",
+ "tts_provider_tips.chatterbox": "##### Chatterbox TTS 设置(自托管)\n- 运行 OpenAI 兼容的 Chatterbox 服务,例如 devnen/Chatterbox-TTS-Server 或 travisvn/chatterbox-tts-api,并将 Base URL 设置为服务的 /v1 endpoint\n- Voices 是服务暴露的音色名称列表,用英文逗号分隔;可以追加 -Female 或 -Male 后缀,仅用于在下拉框中标记性别\n- Chatterbox 不支持朗读音量设置,因为 OpenAI /audio/speech API 没有 volume 字段;可使用朗读速度调整效果",
"Hide Log": "隐藏日志",
"Hide Basic Settings": "隐藏基础设置\n\n隐藏后,基础设置面板将不会显示在页面中。\n\n如需要再次显示,请在 `config.toml` 中设置 `hide_config = false`",
"LLM Settings": "**大模型设置**",
@@ -164,6 +171,26 @@
"Coverr API Key deleted successfully": "Coverr API 密钥删除成功",
"Advanced Video Settings": "高级视频设置",
"Video Encoder": "视频编码器",
- "Video Encoder Help": "高级选项。默认 libx264 最稳定;选择硬件编码器时,如果当前 FFmpeg、显卡或驱动不可用,会自动回退到 libx264。"
+ "Video Encoder Help": "高级选项。默认 libx264 最稳定;选择硬件编码器时,如果当前 FFmpeg、显卡或驱动不可用,会自动回退到 libx264。",
+ "llm_provider_tips.ollama": "##### Ollama 配置说明\n- **API Key**: 随便填写,比如 123\n- **Base Url**: 一般为 http://localhost:11434/v1\n - 如果 `MoneyPrinterTurbo` 和 `Ollama` **不在同一台机器上**,需要填写 `Ollama` 机器的 IP 地址\n - 如果 `MoneyPrinterTurbo` 是 `Docker` 部署,建议填写 `http://host.docker.internal:11434/v1`{docker_hint}\n- **Model Name**: 使用 `ollama list` 查看,比如 `qwen:7b`",
+ "llm_provider_tips.ollama.docker_hint": "\n > 检测到容器环境,未配置 Base Url 时会默认使用 `http://host.docker.internal:11434/v1`\n",
+ "llm_provider_tips.openai": "##### OpenAI 配置说明\n> 需要 VPN 开启全局流量模式\n- **API Key**: [点击到官网申请](https://platform.openai.com/api-keys)\n- **Base Url**: 官方 OpenAI 可留空;如果使用 OpenAI 兼容供应商(例如 OpenRouter),请填写对应的兼容接口地址\n- **Model Name**: 填写**有权限**的模型;如果使用兼容供应商,请填写该平台支持的模型 ID",
+ "llm_provider_tips.aihubmix": "##### AIHubMix 配置说明\n- **API Key**: 在 AIHubMix 控制台创建 API Key\n- **Base Url**: 预填 https://aihubmix.com/v1\n- **Model Name**: 默认 gpt-5.4-mini,也可以填写 AIHubMix 支持的其它模型 ID",
+ "llm_provider_tips.aimlapi": "##### AIML API 配置说明\n- **API Key**: [点击创建 API Key](https://aimlapi.com/app/keys)\n- **Base Url**: https://api.aimlapi.com/v1\n- **Model Name**: 例如 `openai/gpt-4o-mini`、`openai/gpt-4o`、`anthropic/claude-sonnet-4.5`、`google/gemini-3-flash-preview`",
+ "llm_provider_tips.evolink": "##### EvoLink 配置说明\n- **API Key**: [点击到官网申请](https://evolink.ai/dashboard/keys)\n- **Base Url**: 默认 https://direct.evolink.ai/v1\n- **Model Name**: 默认 gpt-5.5,也可以填写 EvoLink 支持的其它模型 ID",
+ "llm_provider_tips.volcengine": "##### VolcEngine Ark 配置说明\n- **注册链接**: [点击注册火山引擎](https://www.volcengine.com/activity/ai618?utm_campaign=hw&utm_content=hw&utm_medium=devrel_tool_web&utm_source=OWO&utm_term=MoneyPrinterTurbo)\n- **API Key**: 在火山引擎方舟控制台创建 API Key\n- **Base Url**: 默认 https://ark.cn-beijing.volces.com/api/v3\n- **Model Name**: 填写 Ark 控制台已开通的模型 ID,例如 doubao-seed-2-1-turbo-260628",
+ "llm_provider_tips.moonshot": "##### Kimi / Moonshot 配置说明\n- **API Key**: [点击到 Kimi 开放平台申请](https://platform.kimi.com/console/api-keys?aff=MoneyPrinterTurbo)\n- **Base Url**: 固定为 https://api.moonshot.cn/v1\n- **Model Name**: 默认 kimi-k2.7-code,[点击查看模型列表](https://platform.kimi.com/docs/models?aff=MoneyPrinterTurbo)\n\n推荐理由:\n- **视频创作链路匹配**: 可用于生成视频文案、提炼素材搜索关键词,并影响最终素材匹配效果\n- **长上下文能力强**: 适合处理较长主题、批量脚本和复杂提示词\n- **灵活按量计费**: 支持按需按量扣费,成本透明可控",
+ "llm_provider_tips.oneapi": "##### OneAPI 配置说明\n- **API Key**: 填写您的 OneAPI 密钥\n- **Base Url**: 填写 OneAPI 的基础 URL\n- **Model Name**: 填写您要使用的模型名称,例如 claude-3-5-sonnet-20240620",
+ "llm_provider_tips.qwen": "##### 通义千问 Qwen 配置说明\n- **API Key**: [点击到官网申请](https://dashscope.console.aliyun.com/apiKey)\n- **Base Url**: 留空\n- **Model Name**: 比如 qwen-max,[点击查看模型列表](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction#3ef6d0bcf91wy)",
+ "llm_provider_tips.azure": "##### Azure 配置说明\n> [点击查看如何部署模型](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/how-to/create-resource)\n- **API Key**: [点击到 Azure 后台创建](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI)\n- **Base Url**: 留空\n- **Model Name**: 填写你实际的部署名",
+ "llm_provider_tips.gemini": "##### Gemini 配置说明\n> 需要 VPN 开启全局流量模式\n- **API Key**: [点击到官网申请](https://ai.google.dev/)\n- **Base Url**: 留空\n- **Model Name**: 比如 gemini-1.0-pro",
+ "llm_provider_tips.grok": "##### Grok 配置说明\n- **API Key**: 填写您的 Grok API 密钥\n- **Base Url**: 填写 Grok API 的基础 URL\n- **Model Name**: 比如 grok-4.3",
+ "llm_provider_tips.groq": "##### Groq 配置说明\n- **API Key**: [点击到官网申请](https://console.groq.com/keys)\n- **Base Url**: 固定为 https://api.groq.com/openai/v1\n- **Model Name**: 比如 llama-3.3-70b-versatile",
+ "llm_provider_tips.deepseek": "##### DeepSeek 配置说明\n- **API Key**: [点击到官网申请](https://platform.deepseek.com/api_keys)\n- **Base Url**: 固定为 https://api.deepseek.com\n- **Model Name**: 固定为 deepseek-chat",
+ "llm_provider_tips.mimo": "##### Xiaomi MiMo 配置说明\n- **API Key**: [点击到官网申请](https://platform.xiaomimimo.com/docs/zh-CN/quick-start/first-api-call)\n- **Base Url**: 固定为 https://api.xiaomimimo.com/v1\n- **Model Name**: 默认 mimo-v2.5-pro,也可以按官方文档填写其它可用模型",
+ "llm_provider_tips.modelscope": "##### ModelScope 配置说明\n- **API Key**: [点击到官网申请](https://modelscope.cn/docs/model-service/API-Inference/intro)\n- **Base Url**: 固定为 https://api-inference.modelscope.cn/v1/\n- **Model Name**: 比如 Qwen/Qwen3-32B,[点击查看模型列表](https://modelscope.cn/models?filter=inference_type&page=1)",
+ "llm_provider_tips.ernie": "##### 百度文心一言配置说明\n- **API Key**: [点击到官网申请](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Secret Key**: [点击到官网申请](https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application)\n- **Base Url**: 填写**请求地址**,[点击查看文档](https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11#%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E)",
+ "llm_provider_tips.pollinations": "##### Pollinations AI 配置说明\n- **API Key**: 可选,留空可使用公开访问\n- **Base Url**: 默认 https://text.pollinations.ai/openai\n- **Model Name**: 使用 `openai-fast` 或填写其它模型名称",
+ "llm_provider_tips.litellm": "##### LiteLLM 配置说明\n> [LiteLLM](https://github.com/BerriAI/litellm) 可通过统一接口路由到 100+ LLM providers。\n> 请将对应 provider 的 API key 设置为环境变量,例如 `OPENAI_API_KEY`、`ANTHROPIC_API_KEY`、`GEMINI_API_KEY`、`AWS_ACCESS_KEY_ID` 等。\n- **Model Name**: 使用 LiteLLM 格式,例如 `openai/gpt-4o`、`anthropic/claude-sonnet-4-20250514`、`bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0`、`gemini/gemini-2.5-flash`。查看[完整 provider 列表](https://docs.litellm.ai/docs/providers)"
}
}