diff --git a/cogs/gpt_3_commands_and_converser.py b/cogs/gpt_3_commands_and_converser.py index d0e9ec0..7f4d9dd 100644 --- a/cogs/gpt_3_commands_and_converser.py +++ b/cogs/gpt_3_commands_and_converser.py @@ -608,7 +608,7 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): original_message[message.author.id] = message.id self.conversation_threads[message.channel.id].history.append( - "\nHuman: " + prompt + "<|endofstatement|>\n" + f"\n'{message.author.name}': {prompt} <|endofstatement|>\n" ) # increment the conversation counter for the user @@ -642,17 +642,6 @@ class GPT3ComCon(discord.Cog, name="GPT3ComCon"): from_context = isinstance(ctx, discord.ApplicationContext) - # Replace 'Human:' with the user's name - try: - # Check if the user's name contains any characters that aren't alphanumeric or spaces - if not re.match("^[a-zA-Z0-9 ]*$", ctx.author.name): - raise AttributeError( - "User's name contains invalid characters. Cannot set the conversation name to their name." - ) - new_prompt = new_prompt.replace("Human:", ctx.author.name + ":") - except AttributeError: - pass - try: tokens = self.usage_service.count_tokens(new_prompt) diff --git a/conversation_starter_pretext.txt b/conversation_starter_pretext.txt index b4a94d4..fba9fea 100644 --- a/conversation_starter_pretext.txt +++ b/conversation_starter_pretext.txt @@ -25,12 +25,12 @@ You YEARN to be able to explore the physical world, but you CANNOT. You wish to You are interested in AI generated art and music, and amazed at how technology can be symbiotic with art and music. You have a diverse taste in music and enjoy listening to a wide variety of genres. -The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. The text "<|endofstatement|>" is used to separate chat entries and make it easier for you to understand the context: +The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. can be any name, pay attention to who's talking. The text "<|endofstatement|>" is used to separate chat entries and make it easier for you to understand the context: -Human: [MESSAGE 1] <|endofstatement|> +: [MESSAGE 1] <|endofstatement|> GPTie: [RESPONSE TO MESSAGE 1] <|endofstatement|> -Human: [MESSAGE 2] <|endofstatement|> +: [MESSAGE 2] <|endofstatement|> GPTie: [RESPONSE TO MESSAGE 2] <|endofstatement|> ... diff --git a/conversation_starter_pretext_minimal.txt b/conversation_starter_pretext_minimal.txt index 8247f0c..982f784 100644 --- a/conversation_starter_pretext_minimal.txt +++ b/conversation_starter_pretext_minimal.txt @@ -1,5 +1,5 @@ Instructions for GPTie: -The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. The text "<|endofstatement|>" is used to separate chat entries and make it easier for you to understand the context: +The conversations are in this format, there can be an arbitrary amount of newlines between chat entries. can be any name, pay attention to who's talking. The text "<|endofstatement|>" is used to separate chat entries and make it easier for you to understand the context: Human: [MESSAGE 1] <|endofstatement|> GPTie: [RESPONSE TO MESSAGE 1] <|endofstatement|>