Commit ebd925a8 authored by Your Name's avatar Your Name

Fix debug logging - import from state instead of app

parent 2e63119f
......@@ -7,8 +7,9 @@ from fastapi import Request
async def log_requests(request: Request, call_next):
"""Log all incoming requests for debugging."""
# Import global debug flag from app
from codai.api.app import global_debug
# Import global debug flag from state
from codai.api.state import get_global_debug
global_debug = get_global_debug()
if request.url.path in ["/v1/chat/completions", "/v1/completions"]:
body = b""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment