Add second config check
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m0s
All checks were successful
Build and Publish / build_and_publish (push) Successful in 1m0s
This commit is contained in:
parent
e39134719a
commit
f092e4db48
1 changed files with 21 additions and 0 deletions
|
@ -792,6 +792,27 @@ class Ollama(commands.Cog):
|
||||||
|
|
||||||
key = os.urandom(6).hex()
|
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(
|
embed = discord.Embed(
|
||||||
title="Generating response...",
|
title="Generating response...",
|
||||||
description=">>> ",
|
description=">>> ",
|
||||||
|
|
Loading…
Reference in a new issue