From 0a954d8d8f16e0a698673a7648d695cc14fcdc1f Mon Sep 17 00:00:00 2001 From: ikaros <327209194@qq.com> Date: Sun, 14 Apr 2024 23:18:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=86=85=E9=83=A8api?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9B=91=E5=90=AC=E5=9C=B0=E5=9D=80=E6=94=B9?= =?UTF-8?q?=E4=B8=BA0.0.0.0=EF=BC=8C=E4=B8=BA=E5=90=8E=E6=9C=9F=E8=B7=A8?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=B0=83=E7=94=A8=E6=8F=90=E4=BE=9B=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 96b3e52e..a97461f6 100644 --- a/main.py +++ b/main.py @@ -142,7 +142,7 @@ def llm(): except Exception as e: return jsonify({"code": -1, "message": f"发送数据失败!{e}"}) - app.run(host=config.get("api_ip"), port=config.get("api_port"), debug=False) + app.run(host="0.0.0.0", port=config.get("api_port"), debug=False) # HTTP API线程并启动 schedule_thread = threading.Thread(target=http_api_thread) @@ -2531,8 +2531,8 @@ def send(): data_json = request.get_json() logging.info(f"API收到数据:{data_json}") - if data_json["type"] == "reread": - my_handle.reread_handle(data_json) + if data_json["type"] in ["reread", "reread_top_priority"]: + my_handle.reread_handle(data_json, type=data_json["type"]) elif data_json["type"] == "comment": my_handle.process_data(data_json, "comment") elif data_json["type"] == "tuning": @@ -2546,7 +2546,7 @@ def send(): except Exception as e: return jsonify({"code": -1, "message": f"发送数据失败!{e}"}) - app.run(host=config.get("api_ip"), port=config.get("api_port"), debug=False) + app.run(host="0.0.0.0", port=config.get("api_port"), debug=False) # app.run(host="0.0.0.0", port=8082, debug=True) elif platform == "youtube": import pytchat