aboutsummaryrefslogtreecommitdiffstats
path: root/useragents/src/current_time.py
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2025-05-09 14:53:09 +0000
committerterminaldweller <devi@terminaldweller.com>2025-05-09 14:53:09 +0000
commitcf5499db368a1cb52ab734d204f08bbcc114a890 (patch)
tree03e4c28a170a5c2318093e6a417fde9830ab5061 /useragents/src/current_time.py
parentnow using the options for the google models again (diff)
downloadmilla-main.tar.gz
milla-main.zip
addes user agents. added aliases.HEADmain
Diffstat (limited to 'useragents/src/current_time.py')
-rw-r--r--useragents/src/current_time.py20
1 files changed, 20 insertions, 0 deletions
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")