Skip to main content

Nonebot2 plugin for using llm

Project description

NoneBot 闹钟插件使用指南

📖 简介

本插件为QQ机器人提供智能闹钟管理功能,适用于群聊与私聊场景,支持图片发送。用户可以通过简单指令设置重复/单次提醒,并管理个人提醒事项。

✨ 核心功能

  • 多场景适配 - 群聊@提醒/私聊消息提醒
  • 智能识别 - 支持自然语言输入(示例:"每天21点提醒喝水")
  • 多样化时间格式
    • 精确时间 21:00
    • 日期时间 3.7 12:30 (3月7日12:30)
    • 相对时间 +3h (3小时后)
    • 高级cron表达式
  • 可视化管理
    • 查看提醒列表
    • 启用/禁用提醒
    • 删除指定提醒

📦 安装流程

pip

  1. 安装插件到环境
pip install nonebot-plugin-clock
  1. 添加到 pyproject.toml
plugins = ["nonebot_plugin_clock"]

使用仓库

  1. 安装基础依赖
pip install nonebot2 nonebot-adapter-onebot
pip install nonebot-plugin-apscheduler
  1. 项目clone到NoneBot插件目录
cd src
git@github.com:Zeta-qixi/nonebot-plugin-clock.git

🎲 .env.dev配置

.env.dev

group_at_me = True
use_llm = False
  • group_at_me
    [bool] 群聊是否@发起者,默认True
  • use_llm
    [bool] 是否使用llm,默认False (无效设置,该版本不使用LLM)

🎮 使用手册

⏰ 设置提醒

方式一:自然语言

直接发送: 每天上午8点叫我起床 每周五16:00提醒我提交周报

该方法默认使用正则表达式,对于复杂指令无法识别;llm测试复杂指令检查成功率>95%, 至少要使用32b模型

方式二:快捷命令

添加闹钟 添加提醒 添加临时闹钟 添加临时提醒 + TIME

/添加闹钟 21:00
↓ 机器人响应
请设置闹钟内容(可以发送图片)
> 记得喝水哦~
↓ 结果
添加成功~

使用临时字段为一次性设置

时间参数格式:

  • 基准时间 12:00
  • 日期时间 12.25 9:30 (12月25日9:30)
  • 倒计时 +30m (30分钟后)
  • cron表达式 * * * * * (5位)

📋 查看提醒

查看闹钟 提醒事项 闹钟

返回格式:

1. [每日] 21:00 记得喝水哦~ 
2. [单次] 2023-12-25 09:30 圣诞聚会 (仅一次)

🗑 删除提醒

删除闹钟 删除提醒

/删除闹钟 2 结果
操作完成

⚙ 管理提醒状态

功能 命令示例 说明
启用提醒 /打开闹钟 2 重启暂停的提醒
禁用提醒 /关闭闹钟 2 保留数据暂停提醒

💡 使用示例

场景一:健康提醒

用户:/添加闹钟 +1h
机器人:请设置闹钟内容
用户:该起来活动啦!
机器人:添加成功~

场景二:会议提醒

用户:每周三14:30提醒技术部开会
机器人:明白啦,到时会准时提醒大家

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_clock-1.1.5.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_clock-1.1.5-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_clock-1.1.5.tar.gz.

File metadata

  • Download URL: nonebot_plugin_clock-1.1.5.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for nonebot_plugin_clock-1.1.5.tar.gz
Algorithm Hash digest
SHA256 b6944809b90badf5c51a2a9d98d7d2cc31f1aa130ef9e114da31e4412fbb3b0b
MD5 05c51d2a166660401fba3261825007f5
BLAKE2b-256 7e6b6850acb7bcd3a3d49ae5d366332f3036888fa4fb7112c966359eec358282

See more details on using hashes here.

File details

Details for the file nonebot_plugin_clock-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_clock-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3beadae56b2db086b671d45aa4c87e7c54920021ca601582bd9186b19d59a413
MD5 85b861e04d351098e07c5a693b9f3ee3
BLAKE2b-256 bfa2e8ee0fb426f40800569b46222e12c5ee8c38a24545e5ff2076105ef1c3f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page