Skip to content

Commit

Permalink
move get_datetime
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Nov 29, 2024
1 parent 0b37d45 commit 618d380
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
11 changes: 10 additions & 1 deletion agixt/extensions/agixt_actions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import datetime
import json
import uuid
import requests
Expand Down Expand Up @@ -181,6 +180,7 @@ def __init__(self, **kwargs):
"Replace init in File": self.replace_init_in_file,
"Explain Chain": self.chain_to_mermaid,
"Schedule Follow Up with User": self.schedule_follow_up,
"Get Datetime": self.get_datetime,
}
self.command_name = (
kwargs["command_name"] if "command_name" in kwargs else "Smart Prompt"
Expand Down Expand Up @@ -1191,3 +1191,12 @@ async def chain_to_mermaid(self, chain_name: str):

mermaid = "\n".join(mermaid_diagram)
return f"```mermaid\n{mermaid}\n```"

async def get_datetime(self) -> str:
"""
Get the current date and time
Returns:
str: The current date and time in the format "YYYY-MM-DD HH:MM:SS"
"""
return "Current date and time: " + datetime.now().strftime("%Y-%m-%d %H:%M:%S")
20 changes: 0 additions & 20 deletions agixt/extensions/times.py

This file was deleted.

0 comments on commit 618d380

Please sign in to comment.