Commit a2ea6b1b authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

enh: tool async support

parent 4370f233
...@@ -309,6 +309,9 @@ async def get_function_call_response( ...@@ -309,6 +309,9 @@ async def get_function_call_response(
"__id__": tool_id, "__id__": tool_id,
} }
if inspect.iscoroutinefunction(function):
function_result = await function(**params)
else:
function_result = function(**params) function_result = function(**params)
if hasattr(toolkit_module, "citation") and toolkit_module.citation: if hasattr(toolkit_module, "citation") and toolkit_module.citation:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment