mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
enh: tool async support
This commit is contained in:
@@ -309,7 +309,10 @@ async def get_function_call_response(
|
|||||||
"__id__": tool_id,
|
"__id__": tool_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
function_result = function(**params)
|
if inspect.iscoroutinefunction(function):
|
||||||
|
function_result = await function(**params)
|
||||||
|
else:
|
||||||
|
function_result = function(**params)
|
||||||
|
|
||||||
if hasattr(toolkit_module, "citation") and toolkit_module.citation:
|
if hasattr(toolkit_module, "citation") and toolkit_module.citation:
|
||||||
citation = {
|
citation = {
|
||||||
|
|||||||
Reference in New Issue
Block a user