Ge-AI commited on
Commit
ac0d578
·
verified ·
1 Parent(s): 6700a38

Upload api.py

Browse files
Files changed (1) hide show
  1. api.py +1 -0
api.py CHANGED
@@ -262,6 +262,7 @@ def chat_completions():
262
  if not isinstance(messages, list) or not messages:
263
  return jsonify({"error": "消息格式错误:messages必须是非空列表,且至少包含一条消息"}), 400
264
 
 
265
  model = data.get("model", "gpt-4o")
266
  endpoint_id = get_endpoint_id(model)
267
  is_stream = bool(data.get("stream", False))
 
262
  if not isinstance(messages, list) or not messages:
263
  return jsonify({"error": "消息格式错误:messages必须是非空列表,且至少包含一条消息"}), 400
264
 
265
+ logging.info(f"接收到请求:{json.dumps(data, ensure_ascii=False, indent=2)}")
266
  model = data.get("model", "gpt-4o")
267
  endpoint_id = get_endpoint_id(model)
268
  is_stream = bool(data.get("stream", False))