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
b34b200682
commit
f0856bcb46
2 changed files with 4 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ def get_function_module_by_id(request: Request, pipe_id: str):
|
|||
if valves:
|
||||
try:
|
||||
function_module.valves = Valves(
|
||||
**{k: v for k, v in valves if v is not None}
|
||||
**{k: v for k, v in valves.items() if v is not None}
|
||||
)
|
||||
except Exception as e:
|
||||
log.exception(f"Error loading valves for function {pipe_id}: {e}")
|
||||
|
|
|
|||
|
|
@ -151,7 +151,9 @@ async def sync_functions(
|
|||
if hasattr(function_module, "Valves") and function.valves:
|
||||
Valves = function_module.Valves
|
||||
try:
|
||||
Valves(**{k: v for k, v in function.valves if v is not None})
|
||||
Valves(
|
||||
**{k: v for k, v in function.valves.items() if v is not None}
|
||||
)
|
||||
except Exception as e:
|
||||
log.exception(
|
||||
f"Error validating valves for function {function.id}: {e}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue