Upload api.py
Browse files
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))
|