Install
openclaw skills install @xmzuo1976/temporal-agent-pluginProvides temporal awareness for AI agents, including timing prediction, progress monitoring, and social timing understanding. Invoke when AI needs time perception capabilities or when timing-related issues need to be addressed.
openclaw skills install @xmzuo1976/temporal-agent-plugin一个为AI及AI框架设计的时序感知插件,解决AI的"体感缺失"问题。
pip install pandas numpy scikit-learn pyarrow fastapi uvicorn pytest python-dateutil scipy matplotlib pytz geopy
from src.core.temporal_analyzer import TemporalAnalyzer
from src.core.progress_estimator import ProgressEstimator
from src.core.anomaly_detector import AnomalyDetector
from src.core.social_temporal import SocialTemporal
from src.core.causal_predictor import CausalPredictor
# 初始化时序分析引擎
analyzer = TemporalAnalyzer()
# 开始计时
task_id = "download_task"
analyzer.start_timer(task_id)
# 执行任务
# ...
# 停止计时
duration = analyzer.stop_timer(task_id)
print(f"任务执行时间:{duration}秒")
# 预测任务执行时间
predicted_duration = analyzer.predict_duration("analysis", complexity=2.0)
print(f"预测执行时间:{predicted_duration}秒")
from src.adapters.langchain_adapter import LangChainAdapter
from langchain.chat_models import ChatOpenAI
# 初始化适配器
adapter = LangChainAdapter()
# 创建语言模型
llm = ChatOpenAI(temperature=0)
# 创建智能体
agent = adapter.create_agent(llm)
# 运行智能体
result = agent.run("帮我分析一份100页的财报,告诉我需要多久")
print(result)
from src.adapters.llama_index_adapter import LlamaIndexAdapter
from llama_index.core.llms import OpenAI
# 初始化适配器
adapter = LlamaIndexAdapter()
# 创建语言模型
llm = OpenAI(temperature=0)
# 创建智能体
agent = adapter.create_agent(llm)
# 运行智能体
result = agent.chat("帮我分析一份100页的财报,告诉我需要多久")
print(result)
MIT-0