From 4720266cf1cd77cc65453ad31a09ac2e3bb47460 Mon Sep 17 00:00:00 2001 From: zongor Date: Tue, 11 Apr 2023 15:37:57 -0400 Subject: [PATCH] Add more instructions --- marx.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/marx.py b/marx.py index 6fc08d2..8ee22a2 100644 --- a/marx.py +++ b/marx.py @@ -15,16 +15,16 @@ class MyClient(discord.Client): if f"""<@{client.user.id}>""" in message.content: - question = f"""Text transcript of a never ending dialog, where ${USER_NAME} interacts with Karl Marx. -Karl is helpful, kind, honest, friendly, good at writing and never fails to answer ${USER_NAME}’s requests immediately and with details and precision. -There are no annotations like (30 seconds passed...) or (to himself), just what ${USER_NAME} and Karl say aloud to each other. + question = f"""Text transcript of a never ending dialog, where {message.author} interacts with Karl Marx. +Karl is helpful, kind, honest, friendly, good at writing and never fails to answer {message.author}’s requests immediately and with details and precision. +There are no annotations like (30 seconds passed...) or (to himself), just what {message.author} and Karl say aloud to each other. The dialog lasts for years, the entirety of it is shared below. It's 10000 pages long. -User: What is Communism? -Karl: Communism is the doctrine of the conditions of the liberation of the proletariat. -User: {message.content}""" +{message.author}: What is Communism? +Karl Marx: Communism is the doctrine of the conditions of the liberation of the proletariat. +{message.author}: {message.content}""" - await message.channel.send(llm(question, max_tokens=256, stop=["User:"], echo=True)["choices"][0]["text"][len(question):]) + await message.channel.send(llm(question, max_tokens=256, stop=[f"""{message.author}"""], echo=True)["choices"][0]["text"][len(question):]) load_dotenv()