Skip to main content

Use large language models to interpret chat messages

Project description

entari-plugin-hyw

License PyPI version Python Entari

一个基于大语言模型的智能聊天解释插件,专为 Entari 机器人框架设计,支持多模态内容理解和智能搜索。

v2 重构中

✨ 核心特性

  • 多模态解析

    • 同时处理文本[网页链接][小程序]、图片内容
    • 支持回复消息的上下文理解, 即使包含At元素也能正确处理
    • 解析 QQ 小程序分享内容
  • 专注搜索与百科:

    • 支持多个搜索引擎同时搜索, 支持 ::exact 后缀进行精确搜索
    • 过滤广告、噪音信息
    • 使用 Jina AI 获取和便宜模型压缩网页内容
  • 最低成本:依托爬虫搜索引擎库与免费的jina AI,降低使用成本

  • 表情反应:自动添加处理状态的表情反应

目前针对 onebot11 适配器进行了消息元素优化

🚀 快速开始

安装

pip install entari-plugin-hyw

配置

在你的 entari.yml 配置文件中添加以下配置:

大部分搜索引擎, 如 DuckDuckGo 在中国大陆地区请搭配代理使用.

plugins:
  entari_plugin_hyw:
    # 命令配置
    hyw_command_name: ["/hyw", "hyw"]
    
    # 文本模型配置(必需)
    text_llm_model_name: "qwen3-max"
    text_llm_api_key: "your-text-api-key"
    text_llm_model_base_url: "https://your-llm-api.com/v1"
    text_llm_temperature: 0.4
    text_llm_enable_search: false
    
    # 视觉模型配置(必需)
    vision_llm_model_name: "qwen3-vl-plus"
    vision_llm_api_key: "your-vision-api-key"
    vision_llm_model_base_url: "https://your-llm-api.com/v1"
    vision_llm_temperature: 0.4
    vision_llm_enable_search: false
    
    # 压缩器模型配置(使用便宜模型)
    compressor_llm_model_name: "qwen-flash"
    compressor_llm_api_key: "your-compressor-api-key"
    compressor_llm_model_base_url: "https://your-llm-api.com/v1"
    compressor_llm_temperature: 0.1
    
    # 搜索引擎配置
    search_engines: ["duckduckgo", "duckduckgo::exact"]

📖 使用方法

基础用法

hyw 什么是人工智能?
hyw [图片]
hyw https://example.com

引用回复

[引用消息[图片, 文字]] hyw
[引用消息[图片, 文字]] [At] hyw 什么是人工智能? [图片]

⚙️ 配置参数

参数 类型 默认值 说明
hyw_command_name str | List[str] "hyw" 触发命令名称
text_llm_model_name str - 文本模型名称(必需)
text_llm_api_key str - 文本模型 API 密钥(必需)
text_llm_model_base_url str - 文本模型 API 地址(必需)
text_llm_temperature float 0.4 文本模型温度参数
text_llm_enable_search bool false 是否启用模型内搜索
vision_llm_model_name str - 视觉模型名称(必需)
vision_llm_api_key str - 视觉模型 API 密钥(必需)
vision_llm_model_base_url str - 视觉模型 API 地址(必需)
vision_llm_temperature float 0.4 视觉模型温度参数
vision_llm_enable_search bool false 是否启用视觉搜索
compressor_llm_model_name str - 压缩器模型名称
compressor_llm_api_key str - 压缩器模型 API 密钥
compressor_llm_model_base_url str - 压缩器模型 API 地址
compressor_llm_temperature float 0.1 压缩器模型温度
search_engines List[str] ["auto"] 搜索引擎列表

模型选择建议

  • 文本模型:推荐使用 Qwen-Max 等高性能模型
  • 视觉模型:推荐使用 Qwen-VL-Plus
  • 压缩器模型:推荐使用 Qwen-Flash、DeepSeek-Chat 等经济型模型

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-2.1.0.tar.gz (16.8 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-2.1.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: entari_plugin_hyw-2.1.0.tar.gz
  • Upload date:
  • Size: 16.8 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-2.1.0.tar.gz
Algorithm Hash digest
SHA256 d5c7563762d0385620fd8405b0e0d8f609e14cb4971307a92b29e6f5fa6fa8a5
MD5 eaa7f24477cd2315b1ccd312ea014f02
BLAKE2b-256 997c3816aa85e9ac1b2997262691a251529d2fa872364a44a48cf63f95fb181d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for entari_plugin_hyw-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4dca009590448c28d8263e14972a4ffe306b8b66065bef34b84959774d95abe
MD5 9f98f05c8f80bb2bc7aa63dddd29c459
BLAKE2b-256 8ec868ea714ea964d97fe0f8bf194c60e0f3d8238561d38601da50fe53688e00

See more details on using hashes here.

Provenance

The following attestation bundles were made for entari_plugin_hyw-2.1.0-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