Allow other llava types
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 6s

This commit is contained in:
Nexus 2024-05-27 18:30:51 +01:00
parent 22789057f8
commit 4dc0e6418f

View file

@ -533,7 +533,11 @@ class Ollama(commands.Cog):
self.log.debug("Resolved model to %r" % model) self.log.debug("Resolved model to %r" % model)
if image: if image:
if fnmatch(model, "llava:*") is False: patterns = [
"llava:*",
"llava-llama*:*"
]
if any(fnmatch(model, p) for p in patterns) is False:
await ctx.send( await ctx.send(
f"{ctx.user.mention}: You can only use images with llava. Switching model to `llava:latest`.", f"{ctx.user.mention}: You can only use images with llava. Switching model to `llava:latest`.",
delete_after=5 delete_after=5