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