Skip to content

Commit

Permalink
fix: comfyui tool supports https (langgenius#11823)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaxiaozz authored and 刘江波 committed Dec 20, 2024
1 parent daab903 commit e7363cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/core/tools/provider/builtin/comfyui/comfyui.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ class ComfyUIProvider(BuiltinToolProviderController):
def _validate_credentials(self, credentials: dict[str, Any]) -> None:
ws = websocket.WebSocket()
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:
ws.connect(ws_address)
Expand Down

0 comments on commit e7363cc

Please # to comment.