"docs/source/en/using-diffusers/controlling_generation.md" did not exist on "39299546134b545c1b78b0937147f85aed8fbe4d"
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( ...@@ -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 = {
......
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