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