mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-01 10:34:51 +00:00
Add exception
This commit is contained in:
parent
c1f8c45d29
commit
0256ecc517
1 changed files with 2 additions and 0 deletions
|
|
@ -93,6 +93,8 @@ 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:
|
||||
return await msg.edit_msg(f"ERROR: Status Code {response.status_code}")
|
||||
messages = []
|
||||
for line in response.text.splitlines():
|
||||
if line.startswith('data:'):
|
||||
|
|
|
|||
Loading…
Reference in a new issue