mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-02 02:09:17 -05:00
fix: tool calling
This commit is contained in:
@@ -91,13 +91,13 @@ def get_async_tool_function_and_apply_extra_params(
|
||||
return new_function
|
||||
|
||||
|
||||
async def get_updated_tool_function(function: Callable, extra_params: dict):
|
||||
def get_updated_tool_function(function: Callable, extra_params: dict):
|
||||
# Get the original function and merge updated params
|
||||
__function__ = getattr(function, "__function__", None)
|
||||
__extra_params__ = getattr(function, "__extra_params__", None)
|
||||
|
||||
if __function__ is not None and __extra_params__ is not None:
|
||||
return await get_async_tool_function_and_apply_extra_params(
|
||||
return get_async_tool_function_and_apply_extra_params(
|
||||
__function__,
|
||||
{**__extra_params__, **extra_params},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user