mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 19:40:50 +00:00
13 lines
319 B
Python
13 lines
319 B
Python
from datetime import datetime
|
|
|
|
from langchain.tools import tool
|
|
|
|
|
|
# todo: turn this into a system prompt variable
|
|
@tool
|
|
def get_current_timestamp() -> str:
|
|
"""
|
|
name: get_current_timestamp
|
|
Returns the current timestamp in the format YYYYMMDDHHmmss.
|
|
"""
|
|
return datetime.now().strftime("%Y%m%d%H%M%S")
|