mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 13:51:07 +00:00
refac
This commit is contained in:
parent
e1435501aa
commit
da757069de
@ -166,7 +166,13 @@ async def generate_chat_completion(
|
|||||||
bypass_filter = True
|
bypass_filter = True
|
||||||
|
|
||||||
if hasattr(request.state, "metadata"):
|
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"):
|
if getattr(request.state, "direct", False) and hasattr(request.state, "model"):
|
||||||
models = {
|
models = {
|
||||||
|
Loading…
Reference in New Issue
Block a user