Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Kav-K/GPT3Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Jan 1, 2023
2 parents 4f9006b + 5a79188 commit 53fd818
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 53fd818

Please sign in to comment.