assistant: reply 'images not supported' and skip images

The cog's vision_model defaulted to the text-only llama3.2:3b, so any image in
the message/reply was sent to a non-vision model, causing Ollama 400 'invalid
image input'. Now the bot tells the user images aren't supported and continues
with text-only, preserving normal chat.
This commit is contained in:
owen
2026-09-22 23:02:09 -05:00
parent b8eb40bc64
commit dcf10d85b3
+10
View File
@@ -138,6 +138,16 @@ class Assistant(commands.Cog):
if not content and not image_urls:
return
# Vision is not supported by the configured text-only model. If the user
# sent image(s), tell them once and skip the images, continuing with any
# text so normal chat keeps working (avoids Ollama 400 "invalid image
# input" from sending images to a non-vision model).
if image_urls:
await message.reply("Images not supported at this time.")
image_urls = []
if not content:
return
if question_mode and not content.rstrip().endswith("?"):
if is_ping:
await message.reply("Question mode is on - messages must end with **?**.")