From 13ed2c5c17b6315418d4c4f2554143de3a56f556 Mon Sep 17 00:00:00 2001 From: nex Date: Sat, 11 Nov 2023 19:24:49 +0000 Subject: [PATCH] Open up the ollama command --- cogs/other.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cogs/other.py b/cogs/other.py index 74d554c..92294bd 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1834,8 +1834,7 @@ class OtherCog(commands.Cog): @commands.command( usage="[model:] [server:] " ) - @commands.is_owner() - @commands.max_concurrency(1, wait=True) + @commands.max_concurrency(1, commands.BucketType.user, wait=True) async def ollama(self, ctx: commands.Context, *, query: str): """:3""" if query.startswith("model:"): @@ -1848,6 +1847,10 @@ class OtherCog(commands.Cog): else: model = "orca-mini" + if not await self.bot.is_owner(ctx.author): + if not model.startswith("orca-mini"): + return await ctx.reply(":x: You can only use `orca-mini` models.") + if query.startswith("server:"): host, query = query.split(" ", 1) host = host[7:]