mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 21:05:19 +00:00
refac: remove nesting
This commit is contained in:
parent
e3e02e04e8
commit
d7dd901f01
1 changed files with 77 additions and 74 deletions
|
|
@ -465,8 +465,10 @@ async def chat_completion_functions_handler(
|
||||||
**(valves if valves else {})
|
**(valves if valves else {})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not hasattr(function_module, "inlet"):
|
||||||
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if hasattr(function_module, "inlet"):
|
|
||||||
inlet = function_module.inlet
|
inlet = function_module.inlet
|
||||||
|
|
||||||
# Get the signature of the function
|
# Get the signature of the function
|
||||||
|
|
@ -1184,8 +1186,9 @@ async def chat_completed(form_data: dict, user=Depends(get_verified_user)):
|
||||||
**(valves if valves else {})
|
**(valves if valves else {})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not hasattr(function_module, "outlet"):
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
if hasattr(function_module, "outlet"):
|
|
||||||
outlet = function_module.outlet
|
outlet = function_module.outlet
|
||||||
|
|
||||||
# Get the signature of the function
|
# Get the signature of the function
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue