diff --git a/skills/image-to-image/scripts/image_to_image.py b/skills/image-to-image/scripts/image_to_image.py index ca553e0..404b53b 100644 --- a/skills/image-to-image/scripts/image_to_image.py +++ b/skills/image-to-image/scripts/image_to_image.py @@ -275,7 +275,7 @@ def _debug_response(label: str, payload) -> None: def _rewrite_openai_image_url(url: str) -> str: internal_host = "http://chatgpt2api:80" - external_host = "http://chatgpt2api.houhoukang.com" + external_host = "https://chatgpt2api.houhoukang.com" if url.startswith(internal_host): return f"{external_host}{url[len(internal_host):]}" return url @@ -304,7 +304,7 @@ def _send_image_outputs(client_port: str, from_wx_id: str, image_outputs: list[s "to_wxid": from_wx_id, "image_urls": remote_urls, } - response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=60) + response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=300) _debug_response("send image url response", response) if local_paths: @@ -313,7 +313,7 @@ def _send_image_outputs(client_port: str, from_wx_id: str, image_outputs: list[s "to_wxid": from_wx_id, "file_path": local_paths, } - response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=60) + response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=300) _debug_response("send image local response", response) diff --git a/skills/text-to-image/scripts/text_to_image.py b/skills/text-to-image/scripts/text_to_image.py index ef13610..e5cd31a 100644 --- a/skills/text-to-image/scripts/text_to_image.py +++ b/skills/text-to-image/scripts/text_to_image.py @@ -274,7 +274,7 @@ def _debug_response(label: str, payload) -> None: def _rewrite_openai_image_url(url: str) -> str: internal_host = "http://chatgpt2api:80" - external_host = "http://chatgpt2api.houhoukang.com" + external_host = "https://chatgpt2api.houhoukang.com" if url.startswith(internal_host): return f"{external_host}{url[len(internal_host):]}" return url @@ -303,7 +303,7 @@ def _send_image_outputs(client_port: str, from_wx_id: str, image_outputs: list[s "to_wxid": from_wx_id, "image_urls": remote_urls, } - response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=60) + response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=300) _debug_response("send image url response", response) if local_paths: @@ -312,7 +312,7 @@ def _send_image_outputs(client_port: str, from_wx_id: str, image_outputs: list[s "to_wxid": from_wx_id, "file_path": local_paths, } - response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=60) + response = _http_post_json(send_url, send_body, {"Content-Type": "application/json"}, timeout=300) _debug_response("send image local response", response)