mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-11 20:05:19 +00:00
refac
This commit is contained in:
parent
e1435501aa
commit
da757069de
1 changed files with 7 additions and 1 deletions
|
|
@ -166,7 +166,13 @@ async def generate_chat_completion(
|
|||
bypass_filter = True
|
||||
|
||||
if hasattr(request.state, "metadata"):
|
||||
form_data["metadata"] = request.state.metadata
|
||||
if "metadata" not in form_data:
|
||||
form_data["metadata"] = request.state.metadata
|
||||
else:
|
||||
form_data["metadata"] = {
|
||||
**form_data["metadata"],
|
||||
**request.state.metadata,
|
||||
}
|
||||
|
||||
if getattr(request.state, "direct", False) and hasattr(request.state, "model"):
|
||||
models = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue