prige commited on
Commit
69470f1
·
verified ·
1 Parent(s): ffe705c

Upload tool

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. tool.py +1 -2
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- pytz
2
  smolagents
 
 
 
1
  smolagents
2
+ pytz
tool.py CHANGED
@@ -1,7 +1,7 @@
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
3
- import pytz
4
  import datetime
 
5
 
6
  class GetCurrentDateAndTime(Tool):
7
  name = "get_current_date_and_time"
@@ -42,7 +42,6 @@ class GetCurrentDateAndTime(Tool):
42
  def forward(self, timezone: str) -> str:
43
  # Import datetime and pytz locally
44
  from datetime import datetime
45
- import pytz
46
 
47
  try:
48
  # Validate and get timezone object
 
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
 
3
  import datetime
4
+ import pytz
5
 
6
  class GetCurrentDateAndTime(Tool):
7
  name = "get_current_date_and_time"
 
42
  def forward(self, timezone: str) -> str:
43
  # Import datetime and pytz locally
44
  from datetime import datetime
 
45
 
46
  try:
47
  # Validate and get timezone object