Add second config check
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m0s

This commit is contained in:
Nexus 2024-06-27 00:50:21 +01:00
parent e39134719a
commit f092e4db48
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -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=">>> ",