From 4dc0e6418f9a6eecbde8dc5d997e6762fc5f21d2 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Mon, 27 May 2024 18:30:51 +0100 Subject: [PATCH] Allow other llava types --- src/cogs/ollama.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 0118c1f..2f6e770 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -533,7 +533,11 @@ class Ollama(commands.Cog): self.log.debug("Resolved model to %r" % model) 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( f"{ctx.user.mention}: You can only use images with llava. Switching model to `llava:latest`.", delete_after=5