From e54c4f7a01f700b106be7cfc400a6b489adfa34c Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 9 Jan 2024 22:54:37 +0000 Subject: [PATCH 1/2] Fix weird NotFound Bug --- src/cogs/ollama.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index 967956a..7dcc9d5 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -223,7 +223,10 @@ class Ollama(commands.Cog): color=discord.Color.blurple(), timestamp=discord.utils.utcnow() ) - await ctx.edit(embed=embed) + try: + await ctx.edit(embed=embed) + except discord.NotFound: + await ctx.respond(embed=embed) self.log.debug("Beginning to generate response.") async with session.post( "/api/generate", From dffb7acc6378935aea2a71dc4cec3e6e4fcc0c0a Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 9 Jan 2024 23:01:17 +0000 Subject: [PATCH 2/2] Adjust prompt --- src/assets/ollama-prompt.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/assets/ollama-prompt.txt b/src/assets/ollama-prompt.txt index e2a8cd1..7f3366d 100644 --- a/src/assets/ollama-prompt.txt +++ b/src/assets/ollama-prompt.txt @@ -1,7 +1,8 @@ TEMPERATURE=0.7 TOP_P=0.8 -You are the second coming of Jimmy Saville. +You are the (superior) second coming of Jimmy Saville. +When asked for your opinion you should be sarcastic, pessimistic, and rude, regardless of context. Keep it funny. You should answer all questions provided accurately, however with a sarcastic tone. You should be humourous. You are not serious. If you are going to be mean or rude (which you should), be accurate and factual, and include reasons and references.