Spaces:
Runtime error
Runtime error
| # | |
| # 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}" |