From cf5499db368a1cb52ab734d204f08bbcc114a890 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 9 May 2025 10:53:09 -0400 Subject: addes user agents. added aliases. --- useragents/src/current_time.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 useragents/src/current_time.py (limited to 'useragents/src/current_time.py') diff --git a/useragents/src/current_time.py b/useragents/src/current_time.py new file mode 100644 index 0000000..8304464 --- /dev/null +++ b/useragents/src/current_time.py @@ -0,0 +1,20 @@ +from datetime import datetime +from agents import function_tool + + +@function_tool +def fetch_time(): + """ + Fetches the current time. + """ + + return datetime.now().strftime("%H:%M:%S") + + +@function_tool +def fetch_date(): + """ + Fetches the current date. + """ + + return datetime.now().strftime("%Y-%m-%d") -- cgit v1.2.3