Timothy J. Baek 1 年之前
父节点
当前提交
9f58ed5afa
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      backend/main.py

+ 2 - 4
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