Improve ollama UI
This commit is contained in:
parent
a46e4c0797
commit
9924381b0b
1 changed files with 5 additions and 2 deletions
|
@ -210,9 +210,11 @@ class Ollama(commands.Cog):
|
||||||
|
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="Generating response...",
|
title="Generating response...",
|
||||||
description=">>> \u200b",
|
description=">>> ",
|
||||||
color=discord.Color.blurple()
|
color=discord.Color.blurple(),
|
||||||
|
timestamp=discord.utils.utcnow()
|
||||||
)
|
)
|
||||||
|
await ctx.edit(embed=embed)
|
||||||
async with session.post(
|
async with session.post(
|
||||||
"/api/generate",
|
"/api/generate",
|
||||||
json={
|
json={
|
||||||
|
@ -241,6 +243,7 @@ class Ollama(commands.Cog):
|
||||||
embed.title = "Done!"
|
embed.title = "Done!"
|
||||||
embed.color = discord.Color.green()
|
embed.color = discord.Color.green()
|
||||||
embed.description += line["response"]
|
embed.description += line["response"]
|
||||||
|
embed.timestamp = discord.utils.utcnow()
|
||||||
if len(embed.description) >= 4096:
|
if len(embed.description) >= 4096:
|
||||||
embed.description = embed.description[:4093] + "..."
|
embed.description = embed.description[:4093] + "..."
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue