rtc-voice-chat/backend/tools/builtin/current_time.py
2026-04-02 09:40:23 +08:00

13 lines
320 B
Python

from datetime import datetime
from tools.registry import tool_registry
@tool_registry.register(
name="get_current_time",
description="获取当前日期和时间",
parameters={"type": "object", "properties": {}},
)
def get_current_time() -> str:
return datetime.now().strftime("%Y-%m-%d %H:%M:%S %A")