Update chatbot_ai.py

This commit is contained in:
Yasir Aris M 2024-08-10 20:34:22 +07:00 committed by GitHub
parent 5d5121e4f1
commit 1193e1877c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,6 +103,7 @@ async def gpt4_chatbot(self, ctx: Message, strings):
}
response = await fetch.post("https://duckduckgo.com/duckchat/v1/chat", headers=headers, json=data)
if response.status_code != 200:
self.log.info(response.text)
return await msg.edit_msg(f"ERROR: Status Code {response.status_code}")
messages = []
for line in response.text.splitlines():