Skip to main content

nonebot-plugin-aigfm-peer

跨 bot 通信代理插件,安装到其它 bot 上,配合主插件 nonebot-plugin-aigf-master 使用。

📖 介绍

  • 捕获输出并推送:拦截本 bot 所有插件的输出(文本/图片),通过 HTTP 推送给主 bot(aigf-master),进入其 LLM 上下文(标注 [bot名])
  • 远程插件调用:提供 /peer/invoke 端点,接收主 bot 的远程命令调用,用 synthetic event 执行本 bot 的本地插件
  • 命令推送:启动时扫描本 bot 已注册的 on_command 命令,随推送告知主 bot,让 LLM 了解可调用命令(受白名单控制)

💿 安装

pip install nonebot-plugin-aigfm-peer

在 pyproject.toml 中添加:

[tool.nonebot]
plugins = ["nonebot-plugin-aigfm-peer"]

配置

在 .env 中添加:

# 主插件(Bot A)的 HTTP 端口
AIGFM_PEER_PUSH_PORT=14514
# 共享 token(与主插件 AIGFM_PEER_BOTS 中对应项一致)
AIGFM_PEER_TOKEN="shared_secret"
# 本 bot 名称(与主插件 AIGFM_PEER_BOTS 的 name 对应)
AIGFM_PEER_BOT_NAME="botB"
# 插件白名单:捕获输出 + 命令上报 + 调用核对 共用
# 非空=只捕获/上报这些插件的命令且只允许执行它们;空=捕获所有插件输出但不上报命令、调用不核对
AIGFM_PEER_CAPTURE_PLUGINS=[]

与主插件配合

  1. 在主插件 .env 配置 AIGFM_PEER_BOTS(含本 bot 的 name/port/token)
  2. 两端 token 必须一致
  3. 主插件与 peer 插件的前缀(COMMAND_START)各自独立配置,远程调用时按各 bot 的前缀自动适配

License

MIT

Release files for nonebot-plugin-aigfm-peer 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-aigfm-peer 0.1.2
File Size Uploaded
nonebot_plugin_aigfm_peer-0.1.2.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-aigfm-peer 0.1.2
File Interpreter ABI Platform
nonebot_plugin_aigfm_peer-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / nonebot_plugin_aigfm_peer-0.1.2.tar.gz

Download URL nonebot_plugin_aigfm_peer-0.1.2.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
430186f3f11207316f5d3b873ad1149029e0ac1a5148c80af47ef61faf99e6fd
BLAKE2b-256 checksum
How to use checksums
79efc53fdac9b6e6e4b8929b4f4bad197ccccf01cb135f328a58026c17eae252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / nonebot_plugin_aigfm_peer-0.1.2-py3-none-any.whl

Download URL nonebot_plugin_aigfm_peer-0.1.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2be2453d86d826f4d2fffef40258b1ddd4beb787181fd54c1e0f99183bae0598
BLAKE2b-256 checksum
How to use checksums
2a96e547fa3d9eb235fa98f72d09cc515ad7c99157f35ff1e16ec85d2830d392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page