diff --git a/cogs/gpt_3_commands_and_converser.py b/cogs/gpt_3_commands_and_converser.py index fad7162..65eb406 100644 --- a/cogs/gpt_3_commands_and_converser.py +++ b/cogs/gpt_3_commands_and_converser.py @@ -518,6 +518,12 @@ class GPT3ComCon(commands.Cog, name="GPT3ComCon"): from_context = isinstance(ctx, discord.ApplicationContext) + # Replace 'Human:' with the user's name + try: + new_prompt = new_prompt.replace("Human:", ctx.author.name + ":") + except AttributeError: + pass + try: tokens = self.usage_service.count_tokens(new_prompt)