Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed Mar 9, 2024
1 parent dfcc314 commit 9f58ed5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f58ed5

Please sign in to comment.