enh: tool async support
This commit is contained in:
1 parent
4370f233a1
commit
a2ea6b1b5b
1 file changed
+3
@@ -309,6 +309,9 @@ async def get_function_call_response(
|
||||
"__id__": tool_id,
|
||||
}
|
||||
|
||||
if inspect.iscoroutinefunction(function):
|
||||
function_result = await function(**params)
|
||||
else:
|
||||
function_result = function(**params)
|
||||
|
||||
if hasattr(toolkit_module, "citation") and toolkit_module.citation:
|
||||
|
||||
Reference in new issue
Block a user