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.9.1.tar.gz (10.2 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.9.1-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_clock-1.1.9.1.tar.gz
  • Upload date:
  • Size: 10.2 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.9.1.tar.gz
Algorithm Hash digest
SHA256 0855cfc19d1e208f69ca8e8fde98d5cd53454a850946c51c2f7d1942542468c6
MD5 f4dc468682861f108f070c8f0ff792ee
BLAKE2b-256 6dda114f9f7a92bf7f53f6bf8d67d1c2cf35775a0ea6bf577647ed76c7a65ec5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_clock-1.1.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 461fb5b32580d5fc98a6e97ba3707fba642d2a4af2169009bdf2d5cbe3d78084
MD5 79a8da3e442f75946a9ce048feb42ab9
BLAKE2b-256 d4b60f3fcd30d409fdecc170f4a9e83002abe3809650ac57af466c3b461f5b63

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