mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +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
|
bypass_filter = True
|
||||||
|
|
||||||
if hasattr(request.state, "metadata"):
|
if hasattr(request.state, "metadata"):
|
||||||
|
if "metadata" not in form_data:
|
||||||
form_data["metadata"] = request.state.metadata
|
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 a new issue