mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 19:06:51 +08:00
fix: comfyui tool supports https (#11823)
This commit is contained in:
@@ -11,7 +11,10 @@ class ComfyUIProvider(BuiltinToolProviderController):
|
|||||||
def _validate_credentials(self, credentials: dict[str, Any]) -> None:
|
def _validate_credentials(self, credentials: dict[str, Any]) -> None:
|
||||||
ws = websocket.WebSocket()
|
ws = websocket.WebSocket()
|
||||||
base_url = URL(credentials.get("base_url"))
|
base_url = URL(credentials.get("base_url"))
|
||||||
ws_address = f"ws://{base_url.authority}/ws?clientId=test123"
|
ws_protocol = "ws"
|
||||||
|
if base_url.scheme == "https":
|
||||||
|
ws_protocol = "wss"
|
||||||
|
ws_address = f"{ws_protocol}://{base_url.authority}/ws?clientId=test123"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ws.connect(ws_address)
|
ws.connect(ws_address)
|
||||||
|
|||||||
Reference in New Issue
Block a user