Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

[Bug]: #579

Closed
1 task done
renqabs opened this issue Jun 29, 2023 · 0 comments · Fixed by #582
Closed
1 task done

[Bug]: #579

renqabs opened this issue Jun 29, 2023 · 0 comments · Fixed by #582

Comments

@renqabs
Copy link
Contributor

renqabs commented Jun 29, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

ChatHub.py中class ChatHub的ask_stream方法,当raw=true时不会执行ImageGenAsync函数(即无法画图),也不处理response.get("type") == 6和response.get("type") == 7的消息
image

Steps to reproduce the problem

1、使用ChatHub.ask_stream函数时指定raw=true
2、使用cookie也无法绘画
3、回复的消息过长时,提示连接已断开

What should have happened?

正确处理绘画请求以及response.get("type") == 6和response.get("type") == 7的消息

Version where the problem happens

0.11.6

What Python version are you running this with?

3.10

What is your operating system ?

Linux

Command Line Arguments

No

Console logs

"Traceback (most recent call last):\n  File \"/app/main.py\", line 24, in sydney_process_message\n    async for _, response in chatbot.ask_stream(prompt=user_message, conversation_style=\"creative\",raw=True,\n  File \"/usr/local/lib/python3.11/site-packages/SydneyGPT/SydneyGPT.py\", line 30, in ask_stream\n    async for key, value in super().ask_stream(*args, **kwargs):\n  File \"/usr/local/lib/python3.11/site-packages/EdgeGPT/EdgeGPT.py\", line 181, in ask_stream\n    async for response in self.chat_hub.ask_stream(\n  File \"/usr/local/lib/python3.11/site-packages/SydneyGPT/SydneyGPT.py\", line 55, in ask_stream\n    async for key, value in super().ask_stream(*args, **kwargs):\n  File \"/usr/local/lib/python3.11/site-packages/EdgeGPT/chathub.py\", line 128, in ask_stream\n    msg = await wss.recv()\n          ^^^^^^^^^^^^^^^^\n  File \"/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py\", line 568, in recv\n    await self.ensure_open()\n  File \"/usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py\", line 944, in ensure_open\n    raise self.connection_closed_exc()\nwebsockets.exceptions.ConnectionClosedOK: received 1000 (OK); then sent 1000 (OK)\n"

Additional information

No response

renqabs added a commit to renqabs/EdgeGPT that referenced this issue Jun 29, 2023
renqabs added a commit to renqabs/EdgeGPT that referenced this issue Jun 29, 2023
acheong08 pushed a commit that referenced this issue Jun 29, 2023
fix #579

Co-authored-by: renqabs <130155002+renqabs@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant