From 015772ef9ab2447e97855bff7ce73a8e83ad0dc2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 20 Jun 2024 03:45:13 -0700 Subject: [PATCH] refac --- backend/apps/openai/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/apps/openai/main.py b/backend/apps/openai/main.py index c60c52fad..302dd8d98 100644 --- a/backend/apps/openai/main.py +++ b/backend/apps/openai/main.py @@ -432,7 +432,12 @@ async def generate_chat_completion( idx = model["urlIdx"] if "pipeline" in model and model.get("pipeline"): - payload["user"] = {"name": user.name, "id": user.id} + payload["user"] = { + "name": user.name, + "id": user.id, + "email": user.email, + "role": user.role, + } # Check if the model is "gpt-4-vision-preview" and set "max_tokens" to 4000 # This is a workaround until OpenAI fixes the issue with this model