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.0.0.tar.gz (12.2 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.0.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: entari_plugin_hyw-2.0.0.tar.gz
  • Upload date:
  • Size: 12.2 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.0.0.tar.gz
Algorithm Hash digest
SHA256 892b77a4dac6113912c83090631a3955976bfe6ec1928dd7976409008c2d40fe
MD5 bd5b2d510e585a20a189736b22f04407
BLAKE2b-256 7d1b116ba75efc9315052f5c7358cc6001040fb7eef9e4a1055a76d91c72d3bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for entari_plugin_hyw-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cccf38b68799709133a19223eedeac141520fddf5e0b99f68a03e57ba8663b7
MD5 041607fda557e954227eea7588802bbf
BLAKE2b-256 d955fbe633233d66544373c16d719bae62381ca70bba17b4bee4ca0c769df0c3

See more details on using hashes here.

Provenance

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