entari-plugin-hyw 3.3.1__tar.gz → 3.3.3__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 (55) hide show
  1. entari_plugin_hyw-3.3.3/MANIFEST.in +3 -0
  2. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/PKG-INFO +20 -28
  3. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/README.md +16 -24
  4. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/pyproject.toml +8 -6
  5. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/__init__.py +818 -0
  6. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/anthropic.svg +1 -0
  7. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
  8. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/gemini.svg +1 -0
  9. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/google.svg +1 -0
  10. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
  11. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/microsoft.svg +15 -0
  12. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
  13. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
  14. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
  15. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/openai.svg +1 -0
  16. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
  17. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/perplexity.svg +24 -0
  18. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
  19. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
  20. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
  21. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/highlight.css +10 -0
  22. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/highlight.js +1213 -0
  23. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +1 -0
  24. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/katex.css +1 -0
  25. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/katex.js +1 -0
  26. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/libs/tailwind.css +1 -0
  27. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/package-lock.json +953 -0
  28. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/package.json +16 -0
  29. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/tailwind.config.js +12 -0
  30. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/tailwind.input.css +235 -0
  31. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/template.html +157 -0
  32. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/template.html.bak +157 -0
  33. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/assets/template.j2 +307 -0
  34. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/__init__.py +0 -0
  35. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/config.py +36 -0
  36. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/history.py +146 -0
  37. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/hyw.py +41 -0
  38. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/pipeline.py +1065 -0
  39. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/render.py +596 -0
  40. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/core/render.py.bak +926 -0
  41. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/__init__.py +2 -0
  42. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/browser.py +40 -0
  43. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/misc.py +93 -0
  44. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/playwright_tool.py +36 -0
  45. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/prompts.py +129 -0
  46. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw/utils/search.py +249 -0
  47. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/src/entari_plugin_hyw.egg-info/PKG-INFO +20 -28
  48. entari_plugin_hyw-3.3.3/src/entari_plugin_hyw.egg-info/SOURCES.txt +50 -0
  49. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/src/entari_plugin_hyw.egg-info/requires.txt +3 -4
  50. entari_plugin_hyw-3.3.1/src/entari_plugin_hyw/__init__.py +0 -364
  51. entari_plugin_hyw-3.3.1/src/entari_plugin_hyw/hyw_core.py +0 -700
  52. entari_plugin_hyw-3.3.1/src/entari_plugin_hyw.egg-info/SOURCES.txt +0 -9
  53. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/setup.cfg +0 -0
  54. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
  55. {entari_plugin_hyw-3.3.1 → entari_plugin_hyw-3.3.3}/src/entari_plugin_hyw.egg-info/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ recursive-include src/entari_plugin_hyw *
2
+ global-exclude *.pyc
3
+ global-exclude __pycache__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: entari_plugin_hyw
3
- Version: 3.3.1
3
+ Version: 3.3.3
4
4
  Summary: Use large language models to interpret chat messages
5
5
  Author-email: kumoSleeping <zjr2992@outlook.com>
6
6
  License: MIT
@@ -19,9 +19,9 @@ Description-Content-Type: text/markdown
19
19
  Requires-Dist: arclet-entari[full]>=0.16.5
20
20
  Requires-Dist: openai
21
21
  Requires-Dist: httpx
22
- Provides-Extra: playwright
23
- Requires-Dist: playwright>=1.56.0; extra == "playwright"
24
- Requires-Dist: trafilatura>=2.0.0; extra == "playwright"
22
+ Requires-Dist: markdown>=3.10
23
+ Requires-Dist: crawl4ai>=0.7.8
24
+ Requires-Dist: jinja2>=3.0
25
25
  Provides-Extra: dev
26
26
  Requires-Dist: entari-plugin-server>=0.5.0; extra == "dev"
27
27
  Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
@@ -38,6 +38,10 @@ Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
38
38
 
39
39
  </div>
40
40
 
41
+ # v3.3 迎来大幅度改动、现在图文不符
42
+
43
+
44
+
41
45
  ## 🎑 效果展示
42
46
 
43
47
 
@@ -47,12 +51,9 @@ Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
47
51
  </div>
48
52
 
49
53
  ## ✨ 功能特性
50
- - **关于搜索**:
51
- - 如果不设置 jina token, 模型会根据提示词优先使用 jina / playwright(成功率较低) 获取渲染 bing / google 混合搜索结果。
52
- - 存在 jina token 时,模型会获得一个 web search 工具,~~但我没试过我喜欢白嫖~~。
53
- - 也可以 OpenRouter 的 `:online` 参数,该参数会优先使用模型提供商的搜索、其次 `exa`(较贵) 进行网页搜索。
54
- - 给予 `Alconna` 与 `MessageChain` 混合处理, 深度优化触发体验`。
55
- - **网页获取**:支持通过 **Jina AI** 或 **Playwright** 进行实时页面获取。
54
+ - **关于搜索**:一次性触发 Bing 网页与图片搜索,组合结果后再回应。
55
+ - 给予 `Alconna` `MessageChain` 混合处理, 深度优化触发体验。
56
+ - **网页获取**:使用 Playwright 进行实时页面获取。
56
57
  - **多模态理解**:支持图片视觉分析。
57
58
  - **上下文感知**:维护对话历史记录,支持连续的多轮对话。
58
59
  - `reaction` 表情, 表示任务开始。
@@ -67,12 +68,8 @@ Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
67
68
  pip install entari-plugin-hyw
68
69
  ```
69
70
 
70
- ### 启用 Playwright 支持
71
- 如果你希望使用 Playwright 进行本地网页渲染(而非仅使用 Jina AI):
72
- ```bash
73
- pip install entari-plugin-hyw[playwright]
74
- playwright install chromium
75
- ```
71
+ ### 搜索
72
+ 默认通过 HTTP 请求搜索引擎(DuckDuckGo,可在配置中自定义完整搜索链接,如 `https://duckduckgo.com/?q={query}`)。
76
73
 
77
74
  ## ⚙️ 配置
78
75
 
@@ -86,7 +83,6 @@ plugins:
86
83
  command_name_list: ["zssm", "hyw"]
87
84
 
88
85
  # 主 LLM 模型配置(必需), 如 x-ai/grok-4.1-fast:online、perplexity/sonar
89
- # 如果模型不自带搜索 模型会根据提示词优先使用 jina / playwright(成功率较低) 获取渲染 bing / google 混合搜索结果
90
86
  model_name: "gx-ai/grok-4.1-fast:free"
91
87
  api_key: "your-api-key"
92
88
 
@@ -94,19 +90,8 @@ plugins:
94
90
  base_url: "openai-compatible-url"
95
91
 
96
92
  # --- 浏览器与搜索 ---
97
- # 网页浏览工具: "jina" (默认) 或 "playwright"
98
- browser_tool: "jina"
99
-
100
- # 可选: Jina AI API Key (配置以获得更高限额)(免费方案20/min)
101
- # 配置此项同时会启用 web search 工具
102
- jina_api_key: "jina_..."
103
-
104
- # Playwright 设置
105
93
  headless: true
106
94
 
107
- # 浏览器回退: 当首选 browser_tool 失败时,尝试使用备用 browser_tool (默认: false)
108
- enable_browser_fallback: false
109
-
110
95
  # --- 视觉配置 (可选) ---
111
96
  # 如果未设置,将回退使用主模型
112
97
  vision_model_name: "qwen-vl-plus"
@@ -118,6 +103,10 @@ plugins:
118
103
  reasoning:
119
104
  effort: low
120
105
 
106
+ # --- 交互体验 ---
107
+ # 是否开启表情反应 (默认: true)
108
+ reaction: true
109
+
121
110
  # --- 调试 ---
122
111
  save_conversation: false
123
112
  ```
@@ -148,3 +137,6 @@ hyw -t 一大段话。
148
137
  ### 引用回复
149
138
  支持引用消息进行追问,机器人会自动读取被引用的消息作为上下文:
150
139
  - **引用 + 命令**:机器人将理解被引用消息的内容(包括图片)通过 `MessageChain` 操作拼接 `Text`、`Image` 与部分 `Custom`。
140
+
141
+ UncleCode. (2024). Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper [Computer software].
142
+ GitHub. https://github.com/unclecode/crawl4ai
@@ -10,6 +10,10 @@
10
10
 
11
11
  </div>
12
12
 
13
+ # v3.3 迎来大幅度改动、现在图文不符
14
+
15
+
16
+
13
17
  ## 🎑 效果展示
14
18
 
15
19
 
@@ -19,12 +23,9 @@
19
23
  </div>
20
24
 
21
25
  ## ✨ 功能特性
22
- - **关于搜索**:
23
- - 如果不设置 jina token, 模型会根据提示词优先使用 jina / playwright(成功率较低) 获取渲染 bing / google 混合搜索结果。
24
- - 存在 jina token 时,模型会获得一个 web search 工具,~~但我没试过我喜欢白嫖~~。
25
- - 也可以 OpenRouter 的 `:online` 参数,该参数会优先使用模型提供商的搜索、其次 `exa`(较贵) 进行网页搜索。
26
- - 给予 `Alconna` 与 `MessageChain` 混合处理, 深度优化触发体验`。
27
- - **网页获取**:支持通过 **Jina AI** 或 **Playwright** 进行实时页面获取。
26
+ - **关于搜索**:一次性触发 Bing 网页与图片搜索,组合结果后再回应。
27
+ - 给予 `Alconna` `MessageChain` 混合处理, 深度优化触发体验。
28
+ - **网页获取**:使用 Playwright 进行实时页面获取。
28
29
  - **多模态理解**:支持图片视觉分析。
29
30
  - **上下文感知**:维护对话历史记录,支持连续的多轮对话。
30
31
  - `reaction` 表情, 表示任务开始。
@@ -39,12 +40,8 @@
39
40
  pip install entari-plugin-hyw
40
41
  ```
41
42
 
42
- ### 启用 Playwright 支持
43
- 如果你希望使用 Playwright 进行本地网页渲染(而非仅使用 Jina AI):
44
- ```bash
45
- pip install entari-plugin-hyw[playwright]
46
- playwright install chromium
47
- ```
43
+ ### 搜索
44
+ 默认通过 HTTP 请求搜索引擎(DuckDuckGo,可在配置中自定义完整搜索链接,如 `https://duckduckgo.com/?q={query}`)。
48
45
 
49
46
  ## ⚙️ 配置
50
47
 
@@ -58,7 +55,6 @@ plugins:
58
55
  command_name_list: ["zssm", "hyw"]
59
56
 
60
57
  # 主 LLM 模型配置(必需), 如 x-ai/grok-4.1-fast:online、perplexity/sonar
61
- # 如果模型不自带搜索 模型会根据提示词优先使用 jina / playwright(成功率较低) 获取渲染 bing / google 混合搜索结果
62
58
  model_name: "gx-ai/grok-4.1-fast:free"
63
59
  api_key: "your-api-key"
64
60
 
@@ -66,19 +62,8 @@ plugins:
66
62
  base_url: "openai-compatible-url"
67
63
 
68
64
  # --- 浏览器与搜索 ---
69
- # 网页浏览工具: "jina" (默认) 或 "playwright"
70
- browser_tool: "jina"
71
-
72
- # 可选: Jina AI API Key (配置以获得更高限额)(免费方案20/min)
73
- # 配置此项同时会启用 web search 工具
74
- jina_api_key: "jina_..."
75
-
76
- # Playwright 设置
77
65
  headless: true
78
66
 
79
- # 浏览器回退: 当首选 browser_tool 失败时,尝试使用备用 browser_tool (默认: false)
80
- enable_browser_fallback: false
81
-
82
67
  # --- 视觉配置 (可选) ---
83
68
  # 如果未设置,将回退使用主模型
84
69
  vision_model_name: "qwen-vl-plus"
@@ -90,6 +75,10 @@ plugins:
90
75
  reasoning:
91
76
  effort: low
92
77
 
78
+ # --- 交互体验 ---
79
+ # 是否开启表情反应 (默认: true)
80
+ reaction: true
81
+
93
82
  # --- 调试 ---
94
83
  save_conversation: false
95
84
  ```
@@ -120,3 +109,6 @@ hyw -t 一大段话。
120
109
  ### 引用回复
121
110
  支持引用消息进行追问,机器人会自动读取被引用的消息作为上下文:
122
111
  - **引用 + 命令**:机器人将理解被引用消息的内容(包括图片)通过 `MessageChain` 操作拼接 `Text`、`Image` 与部分 `Custom`。
112
+
113
+ UncleCode. (2024). Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper [Computer software].
114
+ GitHub. https://github.com/unclecode/crawl4ai
@@ -4,13 +4,16 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "entari_plugin_hyw"
7
- version = "3.3.1"
7
+ version = "3.3.3"
8
8
  description = "Use large language models to interpret chat messages"
9
9
  authors = [{name = "kumoSleeping", email = "zjr2992@outlook.com"}]
10
10
  dependencies = [
11
11
  "arclet-entari[full]>=0.16.5",
12
12
  "openai",
13
13
  "httpx",
14
+ "markdown>=3.10",
15
+ "crawl4ai>=0.7.8",
16
+ "jinja2>=3.0",
14
17
  ]
15
18
  requires-python = ">=3.10"
16
19
  readme = "README.md"
@@ -26,7 +29,6 @@ classifiers = [
26
29
  ]
27
30
 
28
31
  [project.optional-dependencies]
29
- playwright = ["playwright>=1.56.0", "trafilatura>=2.0.0"]
30
32
  dev = [
31
33
  "entari-plugin-server>=0.5.0",
32
34
  "satori-python-adapter-onebot11>=0.2.5",
@@ -38,8 +40,8 @@ Repository = "https://github.com/kumoSleeping/entari-plugin-hyw"
38
40
  "Issue Tracker" = "https://github.com/kumoSleeping/entari-plugin-hyw/issues"
39
41
 
40
42
  [tool.setuptools]
41
- packages = ["entari_plugin_hyw"]
42
- package-dir = {"" = "src"}
43
+ include-package-data = true
43
44
 
44
- [tool.setuptools.package-data]
45
- entari_plugin_hyw = ["*.txt", "*.md"]
45
+ [tool.setuptools.packages.find]
46
+ where = ["src"]
47
+ include = ["entari_plugin_hyw*"]