Skip to content

Commit a584517

Browse files
authored
Merge pull request #49 from Misakar-0v0/main
socket连接失败补充error日志,方便感知错误
2 parents 4a9e05f + ad6f31c commit a584517

File tree

1 file changed

+3
-1
lines changed
  • ghostos/framework/openai_realtime

1 file changed

+3
-1
lines changed

ghostos/framework/openai_realtime/ws.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def __init__(
5656
def _create_socket(self, proxy: str, uri: str):
5757
parsed = urllib3.util.parse_url(proxy)
5858
if parsed.scheme != "socks5":
59-
raise NotImplementedError(f"Only socks5 is supported, got {parsed.scheme}")
59+
error_msg = f"OPENAI_PROXY Only socks5 is supported, got \"{proxy}\""
60+
self._logger.error(error_msg)
61+
raise NotImplementedError(error_msg)
6062
host = parsed.hostname
6163
port = parsed.port
6264
s = socks.socksocket()

0 commit comments

Comments
 (0)