Spaces:
Sleeping
Sleeping
Update openai_ondemand_adapter.py
Browse files
openai_ondemand_adapter.py
CHANGED
|
@@ -167,6 +167,7 @@ def format_openai_sse_delta(chunk_str):
|
|
| 167 |
|
| 168 |
@app.route("/v1/chat/completions", methods=["POST"])
|
| 169 |
def chat_completions():
|
|
|
|
| 170 |
data = request.json
|
| 171 |
if not data or "messages" not in data:
|
| 172 |
return jsonify({"error": "请求缺少messages字段"}), 400
|
|
|
|
| 167 |
|
| 168 |
@app.route("/v1/chat/completions", methods=["POST"])
|
| 169 |
def chat_completions():
|
| 170 |
+
keymgr.current_session = None
|
| 171 |
data = request.json
|
| 172 |
if not data or "messages" not in data:
|
| 173 |
return jsonify({"error": "请求缺少messages字段"}), 400
|