Skip to content

Commit

Permalink
Merge pull request #44 from rolanddeboer/main
Browse files Browse the repository at this point in the history
Replace 'Human:' in prompt with actual username
  • Loading branch information
Kav-K authored Jan 1, 2023
2 parents d0be447 + 4ecf299 commit ca8e6b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cogs/gpt_3_commands_and_converser.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,12 @@ async def encapsulated_send(

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)

Expand Down

0 comments on commit ca8e6b0

Please sign in to comment.