Merge pull request #44 from rolanddeboer/main

Replace 'Human:' in prompt with actual username
Kaveen Kumarasinghe 2 years ago committed by GitHub
commit ca8e6b0d66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

Loading…
Cancel
Save