diff --git a/docker-compose.yml b/docker-compose.yml index 2c2374f..b79adf9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: jimmy: container_name: jimmy-v2 - build: . + image: git.i-am.nexus/nex/college-bot:latest restart: unless-stopped tty: true volumes: @@ -9,8 +9,6 @@ services: - ./jimmy.log:/app/jimmy.log - /dev/dri:/dev/dri - jimmy-data:/app/data - ports: - - 11444:8080 extra_hosts: - host.docker.internal:host-gateway ollama: diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index dcab45b..d45eceb 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -507,6 +507,8 @@ class Ollama(commands.Cog): discord.Option(discord.Attachment, "An image to feed into ollama. Only works with llava.", default=None), ], ): + if not SERVER_KEYS: + return await ctx.respond("No servers available. Please try again later.") system_query = None if context is not None: if not self.history.get_thread(context): @@ -834,7 +836,8 @@ class Ollama(commands.Cog): ], ): """Shows the history for a thread.""" - # await ctx.defer(ephemeral=True) + if not SERVER_KEYS: + return await ctx.respond("No servers available. Please try again later.") paginator = commands.Paginator("", "", 4000, "\n\n") thread = self.history.load_thread(thread_id) @@ -859,6 +862,8 @@ class Ollama(commands.Cog): @commands.message_command(name="Ask AI") async def ask_ai(self, ctx: discord.ApplicationContext, message: discord.Message): + if not SERVER_KEYS: + return await ctx.respond("No servers available. Please try again later.") thread = self.history.create_thread(message.author) content = message.clean_content if not content: