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

⚙️ 配置

AI 账户配置项

每个账户(Gemini/OpenAI)都支持以下基础配置,至少填写一个账户,填多个时,当默认API错误时可根据优先级依次降级处理:

  • nickname: 账户的唯一别名,作为首先调用的模型(必填)
  • api_key: 该账户的 API Key(必填)
  • model: 该账户要使用的模型名称(必填)
  • proxy: 为该账户单独设置代理
  • time_out: 该账户的 API 请求超时时间(秒),默认 60

OpenAI 兼容格式特定配置

  • provider: 固定为 "openai"(必填)
  • base_url: OpenAI API 兼容格式的访问地址(必填)

Gemini 特定配置

  • provider: 固定为 "gemini"(必填)

AI 账户配置示例

# Gemini 配置
ai_accounts_0_provider="gemini"
ai_accounts_0_nickname="gemini-1"
ai_accounts_0_api_key="your_gemini_api_key"
ai_accounts_0_model="gemini-2.5-flash"

# OpenAI 配置
ai_accounts_1_provider="openai"
ai_accounts_1_nickname="deepseek-1"
ai_accounts_1_base_url="https://api.deepseek.com"
ai_accounts_1_api_key="your_openai_api_key"
ai_accounts_1_model="deepseek-chat"

# 根据需要可添加更多账户配置
# ai_accounts_3_...

功能配置项

如无特殊需求,使用默认配置即可:

配置项 类型 默认值 说明
default_account_nickname str None 默认使用的账户别名。如果未设置,将使用列表中的第一个账户
summary_max_length int 1000 总结内容的最大长度限制
summary_min_length int 50 总结内容的最小长度限制
summary_cool_down int 0 单个用户调用总结功能的冷却时间(秒)
summary_in_png bool True 是否将总结结果以图片形式发送
summary_max_queue_size int 10 等待处理的总结任务队列最大数量
summary_queue_timeout int 300 任务在队列中等待处理的超时时间(秒)
summary_queue_workers int 2 同时处理总结任务的最大并发数

🕹️ 使用

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

总结定时 [时间] [最少消息数量?=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-1.0.1.tar.gz (26.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-1.0.1-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_summary_group-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e2ca7194169814e274911ee603eb6ab35995c4304e6f6e9e06898f94473378c6
MD5 3af16229c1660b964c9cc7e1e2d9d208
BLAKE2b-256 1431c035ee39d0377475d055f133d2744e32c0c6298400a552d5e9c1497165aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_summary_group-1.0.1.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-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_summary_group-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0847855098dd9bdacc771473122dd280001f42bd4f69d22db8a45dc9e1af2a69
MD5 58d6b8a291c5e834a6d4a93472d943f1
BLAKE2b-256 cc0050fd46f57dc899fac22e47fd49405382da8d924fc64202281e3e0df7caf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_summary_group-1.0.1-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