Skip to content

Commit 53d249f

Browse files
author
Sherwin
committed
fix: use correct crewai imports and add type hints
1 parent 2fd1df6 commit 53d249f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import uuid
22
from datetime import datetime
3-
from langchain.tools import tool
3+
from crewai.tools import tool
44

55
class AgentUtilityTools:
66
"""
@@ -9,7 +9,7 @@ class AgentUtilityTools:
99
"""
1010

1111
@tool("Generate Unique ID")
12-
def generate_id(tool_input=None):
12+
def generate_id(tool_input: str = None) -> str:
1313
"""
1414
Generates a unique Version 4 UUID.
1515
Useful for tagging tasks, creating transaction IDs, or tracking agent actions.
@@ -18,10 +18,10 @@ def generate_id(tool_input=None):
1818
return str(uuid.uuid4())
1919

2020
@tool("Get Current Time")
21-
def get_current_time(tool_input=None):
21+
def get_current_time(tool_input: str = None) -> str:
2222
"""
2323
Returns the current system date and time.
2424
Useful for agents that need to schedule events, check deadlines,
2525
or know 'what day is it today' to avoid hallucinations.
2626
"""
27-
return datetime.now().strftime("%Y-%m-%d %H:%M:%S")
27+
return datetime.now().strftime("%Y-%m-%d %H:%M:%S")

0 commit comments

Comments
 (0)