Co-Authored-By: DmitriyAlergant-T1A <93501479+dmitriyalergant-t1a@users.noreply.github.com>
@@ -406,6 +406,7 @@ async def generate_function_chat_completion(form_data, user, models: dict = {}):
"name": user.name,
"role": user.role,
},
+ "__metadata__": metadata,
}
extra_params["__tools__"] = get_tools(
app,
@@ -604,6 +604,7 @@ class ChatCompletionMiddleware(BaseHTTPMiddleware):
# Initialize data_items to store additional data to be sent to the client