"docs/source/optimization/onnx.mdx" did not exist on "7bd50cabafc60bf45ebbe1957b125d3f4c758ba8"
Commit a2ea6b1b authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

enh: tool async support

parent 4370f233
......@@ -309,7 +309,10 @@ async def get_function_call_response(
"__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:
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