Skip to main content

基于 Nonebot2,使用 AI 分析群聊记录,生成讨论内容的总结。

Project description

nonebot_plugin_summary_group

📖 介绍

基于Nonebot2,使用 AI 分析群聊记录,生成讨论内容的总结。

💿 安装

使用nb-cli安装插件

nb plugin install nonebot_plugin_summary_group

使用pip安装插件

pip install nonebot_plugin_summary_group

⚙️ 配置

在机器人文件夹的env文件中添加下表中配置项。

配置项 必填 默认 说明
gemini_key 与OpenAI二选一 None gemini接口密钥
openai_base_url 与Gemini二选一 None openai接口地址
openai_api_key 与Gemini二选一 None openai接口密钥
summary_model gemini-2.0-flash 模型名称
proxy None 代理设置
summary_max_length 1000 总结最大长度
summary_min_length 50 总结最小长度
summary_cool_down 0 总结冷却时间(0即无冷却,针对人,而非群)
time_out 120 API 请求超时时间
summary_in_png False 总结是否以图片形式发送
summary_max_queue_size 10 请求模型总结队列最大大小
summary_queue_timeout 300 请求模型总结队列等待超时时间(秒)
summary_queue_workers 2 最大并发请求模型总结 API 数
  • 使用Gemini需要配置 gemini_key 与 summary_model。
  • 使用OpenAI兼容的API则需要配置 openai_base_url 、 openai_api_key 与 summary_model。

若同时配置Gemini与OpenAI,则优先使用Gemini。

使用nonebot_plugin_htmlrender渲染图片,为节省不必要的消耗,此包不会作为该项目依赖,需要自行安装并设置summary_in_png=True以使用图片发送。

nb plugin install nonebot_plugin_htmlrender

🕹️ 使用

总结 [消息数量] [特定内容?] :生成该群最近消息数量的总结或指定内容的总结,特定内容为可选项。

总结定时 [时间] [最少消息数量?=summary_max_length] :定时生成消息数量的内容总结,时间:0~23,最少消息数量:默认为总结最大长度,每群的定时总结独立计算,默认不启用。

总结定时取消 :取消本群的定时内容总结。

🙏 感谢

github-markdown-css - 用于美化Markdown文档

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_summary_group-0.7.9.tar.gz (23.6 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_summary_group-0.7.9-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_summary_group-0.7.9.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_summary_group-0.7.9.tar.gz
Algorithm Hash digest
SHA256 954d5fba1dd2f6b2f468faca22db353784698f1c7158a49bc8063d3b4590cf2b
MD5 e42763d3d19eb2b20a859fd2fb20582f
BLAKE2b-256 e93caf178ec628dac5662efb8737588093eec2d7c947a6be66438dde94c41266

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_summary_group-0.7.9.tar.gz:

Publisher: python-publish.yml on StillMisty/nonebot_plugin_summary_group

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nonebot_plugin_summary_group-0.7.9-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_summary_group-0.7.9-py3-none-any.whl
Algorithm Hash digest
SHA256 27bba59be3374ee668e3147a4b259e14b2378caa54a5525dbb58dc8520c25d4c
MD5 f55e9efbb9edfba8fb46ef7d549becb4
BLAKE2b-256 66093fb2ea02dc480c416a58f98cd9807f953737b64e140d6e52bfefaa29089e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_summary_group-0.7.9-py3-none-any.whl:

Publisher: python-publish.yml on StillMisty/nonebot_plugin_summary_group

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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