mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 21:52:56 +08:00
🐛 (llm): 移除图片生成模型能力预检查
This commit is contained in:
parent
86c748534c
commit
61279f8b3d
@ -302,12 +302,6 @@ async def _generate_image_from_message(
|
|||||||
messages = await normalize_to_llm_messages(message)
|
messages = await normalize_to_llm_messages(message)
|
||||||
|
|
||||||
async with await get_model_instance(model) as model_instance:
|
async with await get_model_instance(model) as model_instance:
|
||||||
if not model_instance.can_generate_images:
|
|
||||||
raise LLMException(
|
|
||||||
f"模型 '{model_instance.provider_name}/{model_instance.model_name}'"
|
|
||||||
f"不支持图片生成",
|
|
||||||
code=LLMErrorCode.CONFIGURATION_ERROR,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = await model_instance.generate_response(messages, config=config)
|
response = await model_instance.generate_response(messages, config=config)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user