mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 22:18:09 +01:00
tools functions
This commit is contained in:
13
tools/__init__.py
Normal file
13
tools/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from .search_flights import search_flights
|
||||
|
||||
|
||||
def get_handler(tool_name: str):
|
||||
"""
|
||||
Return a function reference for the given tool.
|
||||
You can add more tools here, e.g. "BookHotel", etc.
|
||||
"""
|
||||
if tool_name == "SearchFlights":
|
||||
return search_flights
|
||||
|
||||
# Or raise if not recognized
|
||||
raise ValueError(f"No handler found for tool '{tool_name}'")
|
||||
Reference in New Issue
Block a user