Spaces:
Runtime error
Runtime error
Ilke Ileri commited on
Commit ·
260002e
1
Parent(s): 7242003
Enhance request logging for better Vapi debugging
Browse files57 unmodified lines585960616263646557 unmodified lines@app.route("/chat/completions", methods=["POST", "OPTIONS"])def chat_completions():# Log incoming requestprint(f"Received {request.method} request from {request.remote_addr}")print(f"Headers: {dict(request.headers)}")# OPTIONS isteği için preflight responseif request.method == "OPTIONS":57 unmodified lines58596061626364656667686957 unmodified lines@app.route("/chat/completions", methods=["POST", "OPTIONS"])def chat_completions():# Log incoming requestprint("=" * 60)print(f"NEW REQUEST: {request.method} from {request.remote_addr}")print(f"Headers: {dict(request.headers)}")if request.method == "POST":print(f"Body: {request.get_data(as_text=True)[:200]}...")print("=" * 60)# OPTIONS isteği için preflight responseif request.method == "OPTIONS":
app.py+5-1