mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
enh: __metadata__ param for tools & functions
Co-Authored-By: DmitriyAlergant-T1A <93501479+dmitriyalergant-t1a@users.noreply.github.com>
This commit is contained in:
@@ -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):
|
||||
"name": user.name,
|
||||
"role": user.role,
|
||||
},
|
||||
"__metadata__": metadata,
|
||||
}
|
||||
|
||||
# Initialize data_items to store additional data to be sent to the client
|
||||
|
||||
Reference in New Issue
Block a user