diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 7fb5804..5223256 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -792,6 +792,27 @@ class Ollama(commands.Cog): key = os.urandom(6).hex() + if server_config.get("is_gpu", False) is False: + cf2 = ConfirmCPURun(ctx) + await ctx.edit( + content=None, + embed=discord.Embed( + title="Before you continue", + description="You've selected a CPU-only server. This will be really slow. This will also likely" + " bring the host to a halt. Consider the pain the CPU is about to endure. " + "Are you super" + " sure you want to continue? You can run `h!ollama-status` to see what servers are" + " available.", + color=discord.Color.red(), + ), + view=cf2 + ) + await cf2.wait() + if cf2.proceed is False: + return await ctx.edit("Cancelled.", embed=None, view=None) + else: + await ctx.edit(view=None) + embed = discord.Embed( title="Generating response...", description=">>> ",