mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
Update makeprompt.py
This commit is contained in:
@@ -142,15 +142,12 @@ To include IMAGES, botator does [image:"here a short title of the image"], then
|
|||||||
presence_penalty=float(presence_penalty),
|
presence_penalty=float(presence_penalty),
|
||||||
stop=[" Human:", " AI:", "AI:", "<|endofprompt|>",]
|
stop=[" Human:", " AI:", "AI:", "<|endofprompt|>",]
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
await asyncio.sleep(15)
|
response = None
|
||||||
if e == "You exceeded your current quota, please check your plan and billing details.":
|
await message.channel.send(f"```diff\n-Error: OpenAI API ERROR.\n\n{e}```")
|
||||||
await message.channel.send("```diff\n-OPENAI ERROR\nYou exceeded your current quota, please check your plan and billing details.```")
|
|
||||||
return
|
return
|
||||||
else: continue
|
if response != None: break
|
||||||
break
|
|
||||||
response = response["choices"][0]["text"]
|
response = response["choices"][0]["text"]
|
||||||
Images_capital = re.findall(r"\[Image:(.*?)\]", response)
|
Images_capital = re.findall(r"\[Image:(.*?)\]", response)
|
||||||
#replace all [Image:...] with [image:...] so that we can use the same code for both
|
#replace all [Image:...] with [image:...] so that we can use the same code for both
|
||||||
|
|||||||
Reference in New Issue
Block a user