app-knmojt-13 / src /tools /executor.py
AiCoderv2's picture
Deploy Gradio app with multiple files
9f9394b verified
raw
history blame contribute delete
482 Bytes
#
# SPDX-FileCopyrightText: Hadad <[email protected]>
# SPDX-License-Identifier: Apache-2.0
#
from .workflows.open_link import open_link
from .workflows.web_search import web_search
async def tool_execution(tool_name, tool_arguments):
if tool_name == "open_link":
return await open_link(tool_arguments["url"])
elif tool_name == "web_search":
return await web_search(tool_arguments["query"])
else:
return f"Unknown tool: {tool_name}"