mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Open up the ollama command
This commit is contained in:
parent
f792905c03
commit
13ed2c5c17
1 changed files with 5 additions and 2 deletions
|
@ -1834,8 +1834,7 @@ class OtherCog(commands.Cog):
|
||||||
@commands.command(
|
@commands.command(
|
||||||
usage="[model:<name:tag>] [server:<ip[:port]>] <query>"
|
usage="[model:<name:tag>] [server:<ip[:port]>] <query>"
|
||||||
)
|
)
|
||||||
@commands.is_owner()
|
@commands.max_concurrency(1, commands.BucketType.user, wait=True)
|
||||||
@commands.max_concurrency(1, wait=True)
|
|
||||||
async def ollama(self, ctx: commands.Context, *, query: str):
|
async def ollama(self, ctx: commands.Context, *, query: str):
|
||||||
""":3"""
|
""":3"""
|
||||||
if query.startswith("model:"):
|
if query.startswith("model:"):
|
||||||
|
@ -1848,6 +1847,10 @@ class OtherCog(commands.Cog):
|
||||||
else:
|
else:
|
||||||
model = "orca-mini"
|
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:"):
|
if query.startswith("server:"):
|
||||||
host, query = query.split(" ", 1)
|
host, query = query.split(" ", 1)
|
||||||
host = host[7:]
|
host = host[7:]
|
||||||
|
|
Loading…
Reference in a new issue