Update app.py
Browse files
app.py
CHANGED
|
@@ -787,13 +787,15 @@ def handsome_chat_completions():
|
|
| 787 |
data = request.get_json()
|
| 788 |
if not data or 'model' not in data:
|
| 789 |
return jsonify({"error": "Invalid request data"}), 400
|
|
|
|
|
|
|
|
|
|
| 790 |
if model_name not in models["text"] and model_name not in models["image"]:
|
| 791 |
if "DeepSeek-R1" in model_name and (model_name.endswith("-openwebui") or model_name.endswith("-thinking")):
|
| 792 |
pass
|
| 793 |
else:
|
| 794 |
return jsonify({"error": "Invalid model"}), 400
|
| 795 |
|
| 796 |
-
model_name = data['model']
|
| 797 |
model_realname = model_name.replace("-thinking", "").replace("-openwebui", "")
|
| 798 |
|
| 799 |
request_type = determine_request_type(
|
|
|
|
| 787 |
data = request.get_json()
|
| 788 |
if not data or 'model' not in data:
|
| 789 |
return jsonify({"error": "Invalid request data"}), 400
|
| 790 |
+
|
| 791 |
+
model_name = data['model']
|
| 792 |
+
|
| 793 |
if model_name not in models["text"] and model_name not in models["image"]:
|
| 794 |
if "DeepSeek-R1" in model_name and (model_name.endswith("-openwebui") or model_name.endswith("-thinking")):
|
| 795 |
pass
|
| 796 |
else:
|
| 797 |
return jsonify({"error": "Invalid model"}), 400
|
| 798 |
|
|
|
|
| 799 |
model_realname = model_name.replace("-thinking", "").replace("-openwebui", "")
|
| 800 |
|
| 801 |
request_type = determine_request_type(
|