Update makeprompt.py

This commit is contained in:
Paillat
2023-02-09 20:15:51 +01:00
parent a7edfa3edc
commit 6350ef397e

View File

@@ -136,7 +136,7 @@ To include IMAGES, botator does [image:"here a short title of the image"], then
prompt = prompt + f"\n{self.bot.user.name} ({now.strftime('%Y-%m-%d %H:%M:%S')}):" prompt = prompt + f"\n{self.bot.user.name} ({now.strftime('%Y-%m-%d %H:%M:%S')}):"
openai.api_key = api_key openai.api_key = api_key
#we can try up to 10 times to get a response from the API #we can try up to 10 times to get a response from the API
await message.channel.send(f"```diff\n-DEBUG```\n {prompt}") #debug only #await message.channel.send(f"```diff\n-DEBUG```\n {prompt}") #debug only
for i in range(10): for i in range(10):
try: try:
response = await openai.Completion.acreate( response = await openai.Completion.acreate(