Skip to content

Commit 7acf0b9

Browse files
committed
fix: 更新为 SiliconFlow 免费模型
更新推荐模型为 SiliconFlow 平台真正的免费模型: - 图像生成: Kwai-Kolors/Kolors (免费) - 图像分析: THUDM/GLM-4.1V-9B-Thinking (免费)
1 parent c201253 commit 7acf0b9

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

custom_components/ai_hub/api/siliconflow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,15 @@ async def _stream_chat_completion(
175175
async def generate_image(
176176
self,
177177
prompt: str,
178-
model: str = "black-forest-labs/FLUX.1-schnell",
178+
model: str = "Kwai-Kolors/Kolors",
179179
size: str = "1024x1024",
180180
**kwargs: Any,
181181
) -> APIResponse:
182182
"""Generate an image using SiliconFlow.
183183
184184
Args:
185185
prompt: Image description
186-
model: Model to use (default: black-forest-labs/FLUX.1-schnell)
186+
model: Model to use (default: Kwai-Kolors/Kolors - free)
187187
size: Image size (default: 1024x1024)
188188
**kwargs: Additional parameters
189189
@@ -207,15 +207,15 @@ async def analyze_image(
207207
self,
208208
image_url: str,
209209
prompt: str,
210-
model: str = "Qwen/Qwen2-VL-72B-Instruct",
210+
model: str = "THUDM/GLM-4.1V-9B-Thinking",
211211
**kwargs: Any,
212212
) -> APIResponse:
213213
"""Analyze an image using vision model.
214214
215215
Args:
216216
image_url: URL or base64 data URL of the image
217217
prompt: Analysis prompt
218-
model: Vision model to use
218+
model: Vision model to use (default: THUDM/GLM-4.1V-9B-Thinking - free)
219219
**kwargs: Additional parameters
220220
221221
Returns:

custom_components/ai_hub/const.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ def get_localized_name(hass: HomeAssistant, zh_name: str, en_name: str) -> str:
197197
"ai_task_temperature": 0.95,
198198
"ai_task_top_p": 0.7,
199199
"ai_task_max_tokens": 2000,
200-
# Image
201-
"image_model": "black-forest-labs/FLUX.1-schnell",
202-
"image_analysis_model": "Qwen/Qwen2-VL-72B-Instruct",
200+
# Image (Free models on SiliconFlow)
201+
"image_model": "Kwai-Kolors/Kolors",
202+
"image_analysis_model": "THUDM/GLM-4.1V-9B-Thinking",
203203
# TTS
204204
"tts_voice": "zh-CN-XiaoxiaoNeural",
205205
# STT
@@ -304,7 +304,8 @@ def get_localized_name(hass: HomeAssistant, zh_name: str, en_name: str) -> str:
304304

305305
# Image generation models
306306
AI_HUB_IMAGE_MODELS: Final = [
307-
"black-forest-labs/FLUX.1-schnell", # Free (recommended)
307+
"Kwai-Kolors/Kolors", # Free (recommended)
308+
"black-forest-labs/FLUX.1-schnell",
308309
"black-forest-labs/FLUX.1-dev",
309310
"black-forest-labs/FLUX-pro",
310311
"stabilityai/stable-diffusion-3-5-large",
@@ -313,7 +314,8 @@ def get_localized_name(hass: HomeAssistant, zh_name: str, en_name: str) -> str:
313314

314315
# Vision models (support image analysis)
315316
VISION_MODELS: Final = [
316-
"Qwen/Qwen2-VL-72B-Instruct", # Recommended
317+
"THUDM/GLM-4.1V-9B-Thinking", # Free (recommended)
318+
"Qwen/Qwen2-VL-72B-Instruct",
317319
"Qwen/Qwen2-VL-7B-Instruct",
318320
"meta-llama/Llama-3.2-11B-Vision-Instruct",
319321
]

0 commit comments

Comments
 (0)