From 9f58ed5afac25d056112c9cc7dc71a9da4df859c Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Mar 2024 22:52:42 -0800 Subject: [PATCH] fix --- backend/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/main.py b/backend/main.py index 330c9b29..bb424ae0 100644 --- a/backend/main.py +++ b/backend/main.py @@ -61,13 +61,11 @@ async def on_startup(): class RAGMiddleware(BaseHTTPMiddleware): async def dispatch(self, request: Request, call_next): - - "chat/completions" in request.url.path - - print(request.url.path) if request.method == "POST" and ( "/api/chat" in request.url.path or "/chat/completions" in request.url.path ): + print(request.url.path) + # Read the original request body body = await request.body() # Decode body to string