Spaces:
Runtime error
Runtime error
Update api.py
Browse files
api.py
CHANGED
@@ -20,9 +20,17 @@ def chat_completions():
|
|
20 |
max_tokens=max_tokens,
|
21 |
temperature=temperature
|
22 |
)
|
23 |
-
return jsonify(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
except Exception as e:
|
25 |
return jsonify({"error": str(e)}), 500
|
26 |
|
27 |
if __name__ == '__main__':
|
28 |
-
app.run(host='0.0.0.0', port=8081)
|
|
|
20 |
max_tokens=max_tokens,
|
21 |
temperature=temperature
|
22 |
)
|
23 |
+
return jsonify({
|
24 |
+
"model": "DS-R1-Qwen3-8B",
|
25 |
+
"choices": [{
|
26 |
+
"message": {
|
27 |
+
"role": "assistant",
|
28 |
+
"content": result
|
29 |
+
}
|
30 |
+
}]
|
31 |
+
})
|
32 |
except Exception as e:
|
33 |
return jsonify({"error": str(e)}), 500
|
34 |
|
35 |
if __name__ == '__main__':
|
36 |
+
app.run(host='0.0.0.0', port=8081)
|