Spaces:
Runtime error
Runtime error
Update api.py
Browse files
api.py
CHANGED
@@ -4,7 +4,7 @@ import time
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
-
@app.route('
|
8 |
def chat_completions():
|
9 |
data = request.json
|
10 |
messages = data.get('messages', [])
|
@@ -25,4 +25,4 @@ def chat_completions():
|
|
25 |
return jsonify({"error": str(e)}), 500
|
26 |
|
27 |
if __name__ == '__main__':
|
28 |
-
app.run(host='
|
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
@app.route('/v1/chat/completions', methods=['POST'])
|
8 |
def chat_completions():
|
9 |
data = request.json
|
10 |
messages = data.get('messages', [])
|
|
|
25 |
return jsonify({"error": str(e)}), 500
|
26 |
|
27 |
if __name__ == '__main__':
|
28 |
+
app.run(host='3.7.9.1', port=8081) # Note port 8081
|