entari-plugin-hyw 3.3.5__tar.gz → 3.3.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of entari-plugin-hyw might be problematic. Click here for more details.

Files changed (56) hide show
  1. entari_plugin_hyw-3.3.7/PKG-INFO +142 -0
  2. entari_plugin_hyw-3.3.7/README.md +113 -0
  3. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/pyproject.toml +2 -1
  4. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/__init__.py +14 -351
  5. entari_plugin_hyw-3.3.7/src/entari_plugin_hyw/assets/libs/tailwind.css +1 -0
  6. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/tailwind.input.css +1 -1
  7. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/template.j2 +113 -20
  8. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/config.py +1 -0
  9. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/pipeline.py +131 -103
  10. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/render.py +65 -41
  11. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/prompts.py +26 -16
  12. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/search.py +233 -3
  13. entari_plugin_hyw-3.3.7/src/entari_plugin_hyw.egg-info/PKG-INFO +142 -0
  14. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -1
  15. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw.egg-info/requires.txt +1 -0
  16. entari_plugin_hyw-3.3.5/PKG-INFO +0 -142
  17. entari_plugin_hyw-3.3.5/README.md +0 -114
  18. entari_plugin_hyw-3.3.5/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -1
  19. entari_plugin_hyw-3.3.5/src/entari_plugin_hyw/core/render.py.bak +0 -926
  20. entari_plugin_hyw-3.3.5/src/entari_plugin_hyw.egg-info/PKG-INFO +0 -142
  21. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/MANIFEST.in +0 -0
  22. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/setup.cfg +0 -0
  23. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
  24. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
  25. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
  26. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
  27. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
  28. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
  29. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
  30. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
  31. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
  32. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
  33. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
  34. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
  35. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
  36. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
  37. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
  38. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
  39. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
  40. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
  41. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
  42. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
  43. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
  44. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/package.json +0 -0
  45. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
  46. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/template.html +0 -0
  47. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
  48. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/__init__.py +0 -0
  49. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/history.py +0 -0
  50. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/core/hyw.py +0 -0
  51. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/__init__.py +0 -0
  52. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/browser.py +0 -0
  53. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/misc.py +0 -0
  54. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
  55. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
  56. {entari_plugin_hyw-3.3.5 → entari_plugin_hyw-3.3.7}/src/entari_plugin_hyw.egg-info/top_level.txt +0 -0
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.4
2
+ Name: entari_plugin_hyw
3
+ Version: 3.3.7
4
+ Summary: Use large language models to interpret chat messages
5
+ Author-email: kumoSleeping <zjr2992@outlook.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/kumoSleeping/entari-plugin-hyw
8
+ Project-URL: Repository, https://github.com/kumoSleeping/entari-plugin-hyw
9
+ Project-URL: Issue Tracker, https://github.com/kumoSleeping/entari-plugin-hyw/issues
10
+ Keywords: entari,llm,ai,bot,chat
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: arclet-entari[full]>=0.16.5
20
+ Requires-Dist: openai
21
+ Requires-Dist: httpx
22
+ Requires-Dist: markdown>=3.10
23
+ Requires-Dist: crawl4ai>=0.7.8
24
+ Requires-Dist: jinja2>=3.0
25
+ Requires-Dist: ddgs>=9.10.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: entari-plugin-server>=0.5.0; extra == "dev"
28
+ Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
29
+
30
+
31
+ # Entari Plugin HYW
32
+
33
+
34
+ [![PyPI version](https://badge.fury.io/py/entari-plugin-hyw.svg)](https://badge.fury.io/py/entari-plugin-hyw)
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
36
+ [![Python Versions](https://img.shields.io/pypi/pyversions/entari-plugin-hyw.svg)](https://pypi.org/project/entari-plugin-hyw/)
37
+
38
+ **Entari Plugin HYW** is an advanced agentic chat plugin for the [Entari](https://github.com/entari-org/entari) framework. It leverages Large Language Models (LLMs) to provide intelligent, context-aware, and multi-modal responses within instant messaging environments (OneBot 11, Satori).
39
+
40
+ **Entari Plugin HYW** 是 Entari 框架的高级智能体聊天插件。它利用大语言模型(LLM)在即时通讯环境(OneBot 11, Satori)中提供智能、上下文感知和多模态的回复体验。
41
+
42
+ The plugin implements a three-stage pipeline (**Vision**, **Instruct**, **Agent**) to autonomously decide when to search the web, crawl pages, or analyze images to answer user queries effectively.
43
+
44
+ 插件实现了三阶段流水线(**视觉**、**指令**、**代理**),能够自主决定何时搜索网络、抓取网页或分析图片,从而高效地回答用户问题。
45
+
46
+ <img src="demo.jpg" width="300" />
47
+
48
+ ## Features / 功能特性
49
+
50
+ - 📖 **Agentic Workflow (智能工作流)**
51
+ Autonomous decision-making process to search, browse, and reason.
52
+ 具备自主决策能力,能够自动进行搜索、网页浏览和逻辑推理。
53
+
54
+ - 🎑 **Multi-Modal Support (多模态支持)**
55
+ Native support for image analysis using Vision Language Models (VLMs).
56
+ 原生支持图片分析,利用视觉语言模型(VLM)理解图像内容。
57
+
58
+ - 🔍 **Web Search & Crawling (搜索与抓取)**
59
+ Integrated **DuckDuckGo** and **Crawl4AI** for real-time information retrieval.
60
+ 集成 DuckDuckGo 搜索与 Crawl4AI 网页抓取,实时获取互联网信息。
61
+
62
+ - 🎨 **Rich Rendering (富媒体渲染)**
63
+ Responses are rendered as images containing Markdown, syntax-highlighted code, LaTeX math, and citation badges.
64
+ 回答将渲染为包含 Markdown、代码高亮、LaTeX 公式及引用角标的精美图片。
65
+
66
+ - 🔌 **Protocol Support (多协议适配)**
67
+ Deep integration with OneBot 11 and Satori protocols.
68
+ 深度适配 OneBot 11 和 Satori 协议,完美处理回复上下文与 JSON 卡片。
69
+
70
+ ## Installation / 安装
71
+
72
+ ```bash
73
+ pip install entari-plugin-hyw
74
+ ```
75
+
76
+ ## Configuration / 配置
77
+
78
+ Configure the plugin in your `entari.yml`.
79
+ 在 `entari.yml` 中进行配置。
80
+
81
+ ### Minimal Configuration / 最小配置
82
+
83
+ ```yaml
84
+ plugins:
85
+ entari_plugin_hyw:
86
+ # Trigger command / 触发指令
87
+ question_command: ".q"
88
+
89
+ # Main Model (Required) / 主模型(必需)
90
+ model_name: "google/gemini-2.0-flash-exp"
91
+ api_key: "your-api-key-here"
92
+ base_url: "https://generativelanguage.googleapis.com/v1beta/openai/"
93
+ ```
94
+
95
+ ### Configuration Reference / 配置详解
96
+
97
+ | Option (选项) | Type | Default | Description (说明) |
98
+ | :--- | :--- | :--- | :--- |
99
+ | **Basic** | | | |
100
+ | `question_command` | `str` | `/q` | The command to trigger the bot. <br> 触发机器人的指令前缀。 |
101
+ | `reaction` | `bool` | `true` | React with emoji on start(now only lagrange ob extension). <br> 收到指令时是否回应表情(目前只支持拉格兰ob扩展)。 |
102
+ | `quote` | `bool` | `true` | Quote the user's message in reply. <br> 回复时是否引用原消息。 |
103
+ | **Models** | | | |
104
+ | `model_name` | `str` | *None* | **Required.** Main Agent model ID. <br> **必需。** 主代理模型 ID。 |
105
+ | `api_key` | `str` | *None* | **Required.** API key. <br> **必需。** API 密钥。 |
106
+ | `base_url` | `str` | `...` | OpenAI-compatible API base URL. <br> 兼容 OpenAI 的 API 地址。 |
107
+ | `extra_body` | `dict` | `null` | Extra parameters (e.g. `reasoning_effort`). <br> 传递给 LLM 的额外参数。 |
108
+ | **Specialized** | | | |
109
+ | `vision_model_name`| `str` | *None* | Model for images. Defaults to `model_name`. <br> 处理图片的模型,默认同主模型。 |
110
+ | `intruct_model_name`| `str` | *None* | Model for intent. Defaults to `model_name`. <br> 意图识别模型,默认同主模型。 |
111
+ | **Tools** | | | |
112
+ | `search_provider` | `str` | `ddgs`| `ddgs` (DuckDuckGo), `crawl4ai`, `httpx`. <br> 搜索后端提供商。 |
113
+ | `search_limit` | `int` | `8` | Max search results. <br> 搜索结果数量限制。 |
114
+ | `headless` | `bool` | `true` | Browser headless mode. <br> 浏览器无头模式。 |
115
+
116
+ ## Usage / 使用方法
117
+
118
+ ### Commands / 指令
119
+
120
+ - **Text Query (文本问答)**
121
+ ```text
122
+ .q What's the latest news on Rust 1.83?
123
+ .q Rust 1.83 有什么新特性?
124
+ ```
125
+
126
+ - **Image Analysis (图片分析)**
127
+ *(Send an image with command, or reply to an image)*
128
+ *(发送带图片的指令,或回复一张图片)*
129
+ ```text
130
+ .q [Image] Explain this error.
131
+ .q [图片] 解释一下这个报错。
132
+ ```
133
+
134
+ - **Follow-up (追问)**
135
+ *Reply to the bot's message to continue the conversation.*
136
+ *直接回复机器人的消息即可进行连续对话。*
137
+
138
+ -----
139
+
140
+ ## License
141
+
142
+ This project is licensed under the MIT License.
@@ -0,0 +1,113 @@
1
+
2
+ # Entari Plugin HYW
3
+
4
+
5
+ [![PyPI version](https://badge.fury.io/py/entari-plugin-hyw.svg)](https://badge.fury.io/py/entari-plugin-hyw)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Python Versions](https://img.shields.io/pypi/pyversions/entari-plugin-hyw.svg)](https://pypi.org/project/entari-plugin-hyw/)
8
+
9
+ **Entari Plugin HYW** is an advanced agentic chat plugin for the [Entari](https://github.com/entari-org/entari) framework. It leverages Large Language Models (LLMs) to provide intelligent, context-aware, and multi-modal responses within instant messaging environments (OneBot 11, Satori).
10
+
11
+ **Entari Plugin HYW** 是 Entari 框架的高级智能体聊天插件。它利用大语言模型(LLM)在即时通讯环境(OneBot 11, Satori)中提供智能、上下文感知和多模态的回复体验。
12
+
13
+ The plugin implements a three-stage pipeline (**Vision**, **Instruct**, **Agent**) to autonomously decide when to search the web, crawl pages, or analyze images to answer user queries effectively.
14
+
15
+ 插件实现了三阶段流水线(**视觉**、**指令**、**代理**),能够自主决定何时搜索网络、抓取网页或分析图片,从而高效地回答用户问题。
16
+
17
+ <img src="demo.jpg" width="300" />
18
+
19
+ ## Features / 功能特性
20
+
21
+ - 📖 **Agentic Workflow (智能工作流)**
22
+ Autonomous decision-making process to search, browse, and reason.
23
+ 具备自主决策能力,能够自动进行搜索、网页浏览和逻辑推理。
24
+
25
+ - 🎑 **Multi-Modal Support (多模态支持)**
26
+ Native support for image analysis using Vision Language Models (VLMs).
27
+ 原生支持图片分析,利用视觉语言模型(VLM)理解图像内容。
28
+
29
+ - 🔍 **Web Search & Crawling (搜索与抓取)**
30
+ Integrated **DuckDuckGo** and **Crawl4AI** for real-time information retrieval.
31
+ 集成 DuckDuckGo 搜索与 Crawl4AI 网页抓取,实时获取互联网信息。
32
+
33
+ - 🎨 **Rich Rendering (富媒体渲染)**
34
+ Responses are rendered as images containing Markdown, syntax-highlighted code, LaTeX math, and citation badges.
35
+ 回答将渲染为包含 Markdown、代码高亮、LaTeX 公式及引用角标的精美图片。
36
+
37
+ - 🔌 **Protocol Support (多协议适配)**
38
+ Deep integration with OneBot 11 and Satori protocols.
39
+ 深度适配 OneBot 11 和 Satori 协议,完美处理回复上下文与 JSON 卡片。
40
+
41
+ ## Installation / 安装
42
+
43
+ ```bash
44
+ pip install entari-plugin-hyw
45
+ ```
46
+
47
+ ## Configuration / 配置
48
+
49
+ Configure the plugin in your `entari.yml`.
50
+ 在 `entari.yml` 中进行配置。
51
+
52
+ ### Minimal Configuration / 最小配置
53
+
54
+ ```yaml
55
+ plugins:
56
+ entari_plugin_hyw:
57
+ # Trigger command / 触发指令
58
+ question_command: ".q"
59
+
60
+ # Main Model (Required) / 主模型(必需)
61
+ model_name: "google/gemini-2.0-flash-exp"
62
+ api_key: "your-api-key-here"
63
+ base_url: "https://generativelanguage.googleapis.com/v1beta/openai/"
64
+ ```
65
+
66
+ ### Configuration Reference / 配置详解
67
+
68
+ | Option (选项) | Type | Default | Description (说明) |
69
+ | :--- | :--- | :--- | :--- |
70
+ | **Basic** | | | |
71
+ | `question_command` | `str` | `/q` | The command to trigger the bot. <br> 触发机器人的指令前缀。 |
72
+ | `reaction` | `bool` | `true` | React with emoji on start(now only lagrange ob extension). <br> 收到指令时是否回应表情(目前只支持拉格兰ob扩展)。 |
73
+ | `quote` | `bool` | `true` | Quote the user's message in reply. <br> 回复时是否引用原消息。 |
74
+ | **Models** | | | |
75
+ | `model_name` | `str` | *None* | **Required.** Main Agent model ID. <br> **必需。** 主代理模型 ID。 |
76
+ | `api_key` | `str` | *None* | **Required.** API key. <br> **必需。** API 密钥。 |
77
+ | `base_url` | `str` | `...` | OpenAI-compatible API base URL. <br> 兼容 OpenAI 的 API 地址。 |
78
+ | `extra_body` | `dict` | `null` | Extra parameters (e.g. `reasoning_effort`). <br> 传递给 LLM 的额外参数。 |
79
+ | **Specialized** | | | |
80
+ | `vision_model_name`| `str` | *None* | Model for images. Defaults to `model_name`. <br> 处理图片的模型,默认同主模型。 |
81
+ | `intruct_model_name`| `str` | *None* | Model for intent. Defaults to `model_name`. <br> 意图识别模型,默认同主模型。 |
82
+ | **Tools** | | | |
83
+ | `search_provider` | `str` | `ddgs`| `ddgs` (DuckDuckGo), `crawl4ai`, `httpx`. <br> 搜索后端提供商。 |
84
+ | `search_limit` | `int` | `8` | Max search results. <br> 搜索结果数量限制。 |
85
+ | `headless` | `bool` | `true` | Browser headless mode. <br> 浏览器无头模式。 |
86
+
87
+ ## Usage / 使用方法
88
+
89
+ ### Commands / 指令
90
+
91
+ - **Text Query (文本问答)**
92
+ ```text
93
+ .q What's the latest news on Rust 1.83?
94
+ .q Rust 1.83 有什么新特性?
95
+ ```
96
+
97
+ - **Image Analysis (图片分析)**
98
+ *(Send an image with command, or reply to an image)*
99
+ *(发送带图片的指令,或回复一张图片)*
100
+ ```text
101
+ .q [Image] Explain this error.
102
+ .q [图片] 解释一下这个报错。
103
+ ```
104
+
105
+ - **Follow-up (追问)**
106
+ *Reply to the bot's message to continue the conversation.*
107
+ *直接回复机器人的消息即可进行连续对话。*
108
+
109
+ -----
110
+
111
+ ## License
112
+
113
+ This project is licensed under the MIT License.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "entari_plugin_hyw"
7
- version = "3.3.5"
7
+ version = "3.3.7"
8
8
  description = "Use large language models to interpret chat messages"
9
9
  authors = [{name = "kumoSleeping", email = "zjr2992@outlook.com"}]
10
10
  dependencies = [
@@ -14,6 +14,7 @@ dependencies = [
14
14
  "markdown>=3.10",
15
15
  "crawl4ai>=0.7.8",
16
16
  "jinja2>=3.0",
17
+ "ddgs>=9.10.0",
17
18
  ]
18
19
  requires-python = ">=3.10"
19
20
  readme = "README.md"