Spaces:
Sleeping
Sleeping
Ilke Ileri
commited on
Commit
·
2311595
1
Parent(s):
b9e9889
Add /v1/chat/completions route for Vapi compatibility
Browse files
app.py
CHANGED
|
@@ -69,7 +69,9 @@ def debug_endpoint():
|
|
| 69 |
except Exception as e:
|
| 70 |
return jsonify({"error": str(e)}), 500
|
| 71 |
|
|
|
|
| 72 |
@app.route("/chat/completions", methods=["POST", "OPTIONS"])
|
|
|
|
| 73 |
def chat_completions():
|
| 74 |
# Log incoming request
|
| 75 |
print("=" * 60)
|
|
|
|
| 69 |
except Exception as e:
|
| 70 |
return jsonify({"error": str(e)}), 500
|
| 71 |
|
| 72 |
+
# Vapi uses /v1/chat/completions, add both routes
|
| 73 |
@app.route("/chat/completions", methods=["POST", "OPTIONS"])
|
| 74 |
+
@app.route("/v1/chat/completions", methods=["POST", "OPTIONS"])
|
| 75 |
def chat_completions():
|
| 76 |
# Log incoming request
|
| 77 |
print("=" * 60)
|