feat: add current time tool in universal chat agent (#659)
This commit is contained in:
parent
741e9303d4
commit
b5825142d1
6 changed files with 40 additions and 21 deletions
|
|
@ -153,3 +153,9 @@ def get_remote_ip(request):
|
|||
def generate_text_hash(text: str) -> str:
|
||||
hash_text = str(text) + 'None'
|
||||
return sha256(hash_text.encode()).hexdigest()
|
||||
|
||||
|
||||
def get_current_datetime(type: str) -> str:
|
||||
# get current time
|
||||
current_time = datetime.utcnow()
|
||||
return current_time.strftime("%Y-%m-%d %H:%M:%S %Z%z")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue