Skip to content

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

feat: add MiniMax as LLM provider

octo-patch3fe9dc59ed25
diff --git a/README-en.md b/README-en.md
index 4590ae31..96443c00 100644
--- a/README-en.md
+++ b/README-en.md
@@ -65,7 +65,7 @@ Picwish focuses on the **image processing field**, providing a rich set of **ima
supports `subtitle outlining`
- [x] Supports **background music**, either random or specified music files, with adjustable `background music volume`
- [x] Video material sources are **high-definition** and **royalty-free**, and you can also use your own **local materials**
-- [x] Supports integration with various models such as **OpenAI**, **Moonshot**, **Azure**, **gpt4free**, **one-api**, **Qwen**, **Google Gemini**, **Ollama**, **DeepSeek**, **ERNIE**, **Pollinations**, **ModelScope** and more
+- [x] Supports integration with various models such as **OpenAI**, **Moonshot**, **Azure**, **gpt4free**, **one-api**, **Qwen**, **Google Gemini**, **Ollama**, **DeepSeek**, **MiniMax**, **ERNIE**, **Pollinations**, **ModelScope** and more
### Future Plans 📅
diff --git a/README.md b/README.md
index df23b08a..797ecdac 100644
--- a/README.md
+++ b/README.md
@@ -58,7 +58,7 @@
- [x] 支持 **字幕生成**,可以调整 `字体`、`位置`、`颜色`、`大小`,同时支持`字幕描边`设置
- [x] 支持 **背景音乐**,随机或者指定音乐文件,可设置`背景音乐音量`
- [x] 视频素材来源 **高清**,而且 **无版权**,也可以使用自己的 **本地素材**
-- [x] 支持 **OpenAI**、**Moonshot**、**Azure**、**gpt4free**、**one-api**、**通义千问**、**Google Gemini**、**Ollama**、**DeepSeek**、 **文心一言**, **Pollinations**、**ModelScope** 等多种模型接入
+- [x] 支持 **OpenAI**、**Moonshot**、**Azure**、**gpt4free**、**one-api**、**通义千问**、**Google Gemini**、**Ollama**、**DeepSeek**、**MiniMax**、 **文心一言**, **Pollinations**、**ModelScope** 等多种模型接入
- 中国用户建议使用 **DeepSeek** 或 **Moonshot** 作为大模型提供商(国内可直接访问,不需要VPN。注册就送额度,基本够用)
diff --git a/app/services/llm.py b/app/services/llm.py
index 949a5ed7..69ffac84 100644
--- a/app/services/llm.py
+++ b/app/services/llm.py
@@ -68,6 +68,12 @@ def _generate_response(prompt: str) -> str:
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 == "deepseek":
api_key = config.app.get("deepseek_api_key")
model_name = config.app.get("deepseek_model_name")
diff --git a/config.example.toml b/config.example.toml
index 5f77f42d..c96b9e9a 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -29,6 +29,7 @@ pixabay_api_keys = []
# g4f
# oneapi
# cloudflare
+# minimax
# ernie (文心一言)
# modelscope (魔搭社区)
llm_provider = "openai"
@@ -94,6 +95,13 @@ qwen_api_key = ""
qwen_model_name = "qwen-max"
+########## MiniMax API Key
+# Visit https://platform.minimaxi.com to get your API key
+# MiniMax API is OpenAI-compatible
+minimax_api_key = ""
+minimax_base_url = "https://api.minimax.io/v1"
+minimax_model_name = "MiniMax-M1"
+
########## DeepSeek API Key
# Visit https://platform.deepseek.com/api_keys to get your API key
deepseek_api_key = ""