From df71d7c63ba16965d7ad391d6af1a4926c1a1f5b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 22 Jun 2024 14:07:11 -0700 Subject: [PATCH] fix --- backend/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/main.py b/backend/main.py index c171810c0..f73b66f27 100644 --- a/backend/main.py +++ b/backend/main.py @@ -881,7 +881,7 @@ async def generate_chat_completions(form_data: dict, user=Depends(get_verified_u # Get the signature of the function sig = inspect.signature(pipe) - param = {"body": form_data} + params = {"body": form_data} if "__user__" in sig.parameters: __user__ = { @@ -908,9 +908,9 @@ async def generate_chat_completions(form_data: dict, user=Depends(get_verified_u async def stream_content(): try: if inspect.iscoroutinefunction(pipe): - res = await pipe(**param) + res = await pipe(**params) else: - res = pipe(**param) + res = pipe(**params) except Exception as e: print(f"Error: {e}") yield f"data: {json.dumps({'error': {'detail':str(e)}})}\n\n"