Skip to main content

Use large language models to interpret chat messages

Project description

Entari Plugin HYW

Entari 智能聊天解释插件

License PyPI Python

IM 环境下的 LLM 智能解释方案

v3.2迎来大幅度改动、现在图文不符

🎑 效果展示

Chat Demo

✨ 功能特性

  • 关于搜索:一次性触发 Bing 网页与图片搜索,组合结果后再回应。
  • 给予 AlconnaMessageChain 混合处理, 深度优化触发体验。
  • 网页获取:使用 Playwright 进行实时页面获取。
  • 多模态理解:支持图片视觉分析。
  • 上下文感知:维护对话历史记录,支持连续的多轮对话。
  • reaction 表情, 表示任务开始。
  • OneBot 优化:针对 OneBot 11 协议深度优化,支持解析 JSON 卡片、引用消息等特殊元素。

📦 安装

基础安装

pip install entari-plugin-hyw

搜索

默认通过 HTTP 请求搜索引擎(DuckDuckGo,可在配置中自定义完整搜索链接,如 https://duckduckgo.com/?q={query})。

⚙️ 配置

请在 entari.yml 中添加以下配置:

plugins:
  entari_plugin_hyw:
    # --- 基础设置 ---
    # 触发机器人的命令列表
    command_name_list: ["zssm", "hyw"]
    
    # 主 LLM 模型配置(必需), 如 x-ai/grok-4.1-fast:online、perplexity/sonar
    model_name: "gx-ai/grok-4.1-fast:free"
    api_key: "your-api-key"

    # 默认 https://openrouter.ai/api/v1
    base_url: "openai-compatible-url"  
    
    # --- 浏览器与搜索 ---
    headless: true
    
    # --- 视觉配置 (可选) ---
    # 如果未设置,将回退使用主模型
    vision_model_name: "qwen-vl-plus"
    vision_api_key: "your-vision-api-key"
    vision_base_url: "your-vision_base_url"
    
    # --- openai extra_body ---
    extra_body:
      reasoning:
        effort: low
    
    # --- 交互体验 ---
    # 是否开启表情反应 (默认: true)
    reaction: true

    # --- 调试 ---
    save_conversation: false

📖 使用方法

基础指令

使用配置的命令前缀与机器人交互:

hyw 最近LLM有啥新闻, 是不是claude又被秒了
hyw [图片消息] 里面这人写代码怎么我一句都看不懂
hyw https://koishi.chat/ 怎么安装
[回复消息] hyw 
[回复消息<[图片消息]>] hyw -t
[回复消息] hyw 补充: 这个rf的意思是github用户RF-Tar-Railt
[回复消息(hyw插件的输出)] /1 详细点描述
[回复消息(hyw插件的输出>] /那谁有多余解释器?

选项参数

  • -t / --text: 强制纯文本模式(跳过图片分析,节省 Token 或时间)。
hyw -t 一大段话。

引用回复

支持引用消息进行追问,机器人会自动读取被引用的消息作为上下文:

  • 引用 + 命令:机器人将理解被引用消息的内容(包括图片)通过 MessageChain 操作拼接 TextImage 与部分 Custom

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

entari_plugin_hyw-3.2.109.tar.gz (270.4 kB view details)

Uploaded Source

Built Distribution

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

entari_plugin_hyw-3.2.109-py3-none-any.whl (280.5 kB view details)

Uploaded Python 3

File details

Details for the file entari_plugin_hyw-3.2.109.tar.gz.

File metadata

  • Download URL: entari_plugin_hyw-3.2.109.tar.gz
  • Upload date:
  • Size: 270.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for entari_plugin_hyw-3.2.109.tar.gz
Algorithm Hash digest
SHA256 4d5027e5e1e2285193fe729ce0f96c9a0d6a850f79ace0a705b53839eab2c3a6
MD5 efed953dda16aba89ff13e206129c235
BLAKE2b-256 640770717ffc80d03742737d9764e59a351f9a03749f582d8942825c83ab4177

See more details on using hashes here.

Provenance

The following attestation bundles were made for entari_plugin_hyw-3.2.109.tar.gz:

Publisher: publish.yml on kumoSleeping/entari-plugin-hyw

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

File details

Details for the file entari_plugin_hyw-3.2.109-py3-none-any.whl.

File metadata

File hashes

Hashes for entari_plugin_hyw-3.2.109-py3-none-any.whl
Algorithm Hash digest
SHA256 064f83d7b9f909837a0d730cfeba209d17ab3e4336d4c02618ecdcda5bbc22e6
MD5 37dd7ad702c58cd34ad659176ee6225e
BLAKE2b-256 4606bf17384c96358e681959e20d4e1cb5247d51adc98b06c88b5f2a6a081117

See more details on using hashes here.

Provenance

The following attestation bundles were made for entari_plugin_hyw-3.2.109-py3-none-any.whl:

Publisher: publish.yml on kumoSleeping/entari-plugin-hyw

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