entari-plugin-hyw 3.3.6__tar.gz → 3.3.8__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 (57) hide show
  1. entari_plugin_hyw-3.3.8/PKG-INFO +113 -0
  2. entari_plugin_hyw-3.3.8/README.md +84 -0
  3. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/pyproject.toml +1 -1
  4. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/__init__.py +10 -10
  5. entari_plugin_hyw-3.3.8/src/entari_plugin_hyw/assets/icon/huggingface.png +0 -0
  6. entari_plugin_hyw-3.3.8/src/entari_plugin_hyw/assets/icon/xiaomi.png +0 -0
  7. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/config.py +8 -8
  8. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/pipeline.py +107 -82
  9. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/render.py +27 -0
  10. entari_plugin_hyw-3.3.8/src/entari_plugin_hyw/utils/prompts.py +140 -0
  11. entari_plugin_hyw-3.3.6/src/entari_plugin_hyw/utils/prompts.py → entari_plugin_hyw-3.3.8/src/entari_plugin_hyw/utils/prompts_cn.py +4 -4
  12. entari_plugin_hyw-3.3.8/src/entari_plugin_hyw.egg-info/PKG-INFO +113 -0
  13. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw.egg-info/SOURCES.txt +3 -0
  14. entari_plugin_hyw-3.3.6/PKG-INFO +0 -143
  15. entari_plugin_hyw-3.3.6/README.md +0 -114
  16. entari_plugin_hyw-3.3.6/src/entari_plugin_hyw.egg-info/PKG-INFO +0 -143
  17. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/MANIFEST.in +0 -0
  18. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/setup.cfg +0 -0
  19. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/anthropic.svg +0 -0
  20. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/deepseek.png +0 -0
  21. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/gemini.svg +0 -0
  22. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/google.svg +0 -0
  23. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/grok.png +0 -0
  24. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/microsoft.svg +0 -0
  25. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/minimax.png +0 -0
  26. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/mistral.png +0 -0
  27. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/nvida.png +0 -0
  28. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/openai.svg +0 -0
  29. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/openrouter.png +0 -0
  30. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/perplexity.svg +0 -0
  31. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/qwen.png +0 -0
  32. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/xai.png +0 -0
  33. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/icon/zai.png +0 -0
  34. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/highlight.css +0 -0
  35. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/highlight.js +0 -0
  36. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/katex-auto-render.js +0 -0
  37. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/katex.css +0 -0
  38. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/katex.js +0 -0
  39. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/libs/tailwind.css +0 -0
  40. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/package-lock.json +0 -0
  41. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/package.json +0 -0
  42. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/tailwind.config.js +0 -0
  43. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/tailwind.input.css +0 -0
  44. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/template.html +0 -0
  45. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/template.html.bak +0 -0
  46. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/assets/template.j2 +0 -0
  47. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/__init__.py +0 -0
  48. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/history.py +0 -0
  49. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/core/hyw.py +0 -0
  50. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/utils/__init__.py +0 -0
  51. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/utils/browser.py +0 -0
  52. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/utils/misc.py +0 -0
  53. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/utils/playwright_tool.py +0 -0
  54. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw/utils/search.py +0 -0
  55. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw.egg-info/dependency_links.txt +0 -0
  56. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw.egg-info/requires.txt +0 -0
  57. {entari_plugin_hyw-3.3.6 → entari_plugin_hyw-3.3.8}/src/entari_plugin_hyw.egg-info/top_level.txt +0 -0
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.4
2
+ Name: entari_plugin_hyw
3
+ Version: 3.3.8
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
+ # Entari Plugin HYW
31
+
32
+ [![PyPI version](https://badge.fury.io/py/entari-plugin-hyw.svg)](https://badge.fury.io/py/entari-plugin-hyw)
33
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
34
+ [![Python Versions](https://img.shields.io/pypi/pyversions/entari-plugin-hyw.svg)](https://pypi.org/project/entari-plugin-hyw/)
35
+
36
+ **English** | [简体中文](docs/README_CN.md)
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
+ 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.
41
+
42
+ <p align="center">
43
+ <img src="docs/demo_mockup.svg" width="800" />
44
+ </p>
45
+
46
+ ## Features
47
+
48
+ - 📖 **Agentic Workflow**
49
+ Autonomous decision-making process to search, browse, and reason.
50
+
51
+ - 🎑 **Multi-Modal Support**
52
+ Native support for image analysis using Vision Language Models (VLMs).
53
+
54
+ - 🔍 **Web Search & Crawling**
55
+ Integrated **DuckDuckGo** and **Crawl4AI** for real-time information retrieval.
56
+
57
+ - 🎨 **Rich Rendering**
58
+ Responses are rendered as images containing Markdown, syntax-highlighted code, LaTeX math, and citation badges.
59
+
60
+ - 🔌 **Protocol Support**
61
+ Deep integration with OneBot 11 and Satori protocols, handling reply context and JSON cards perfectly.
62
+
63
+ ## Installation
64
+
65
+ ```bash
66
+ pip install entari-plugin-hyw
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ Configure the plugin in your `entari.yml`.
72
+
73
+ ### Minimal Configuration
74
+
75
+ ```yaml
76
+ plugins:
77
+ entari_plugin_hyw:
78
+ model_name: google/gemini-3-flash-preview
79
+ api_key: "your-or-api-key-here"
80
+ ```
81
+
82
+ ## Usage
83
+
84
+ ### Commands
85
+
86
+ - **Text Query**
87
+ ```text
88
+ /q What's the latest news on Rust 1.83?
89
+ ```
90
+
91
+ - **Image Analysis**
92
+ *(Send an image with command, or reply to an image)*
93
+ ```text
94
+ /q [Image] Explain this error.
95
+ ```
96
+ - **Quote Query**
97
+ ```text
98
+ [quote: User Message] /q
99
+ ```
100
+
101
+ - **Follow-up**
102
+ *Reply to the bot's message to continue the conversation.*
103
+
104
+ ## Documentation for AI/LLMs
105
+
106
+ - [Instruction Guide (English)](docs/README_LLM_EN.md)
107
+ - [指导手册 (简体中文)](docs/README_LLM_CN.md)
108
+
109
+ ---
110
+
111
+ ## License
112
+
113
+ This project is licensed under the MIT License.
@@ -0,0 +1,84 @@
1
+ # Entari Plugin HYW
2
+
3
+ [![PyPI version](https://badge.fury.io/py/entari-plugin-hyw.svg)](https://badge.fury.io/py/entari-plugin-hyw)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![Python Versions](https://img.shields.io/pypi/pyversions/entari-plugin-hyw.svg)](https://pypi.org/project/entari-plugin-hyw/)
6
+
7
+ **English** | [简体中文](docs/README_CN.md)
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
+ 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.
12
+
13
+ <p align="center">
14
+ <img src="docs/demo_mockup.svg" width="800" />
15
+ </p>
16
+
17
+ ## Features
18
+
19
+ - 📖 **Agentic Workflow**
20
+ Autonomous decision-making process to search, browse, and reason.
21
+
22
+ - 🎑 **Multi-Modal Support**
23
+ Native support for image analysis using Vision Language Models (VLMs).
24
+
25
+ - 🔍 **Web Search & Crawling**
26
+ Integrated **DuckDuckGo** and **Crawl4AI** for real-time information retrieval.
27
+
28
+ - 🎨 **Rich Rendering**
29
+ Responses are rendered as images containing Markdown, syntax-highlighted code, LaTeX math, and citation badges.
30
+
31
+ - 🔌 **Protocol Support**
32
+ Deep integration with OneBot 11 and Satori protocols, handling reply context and JSON cards perfectly.
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ pip install entari-plugin-hyw
38
+ ```
39
+
40
+ ## Configuration
41
+
42
+ Configure the plugin in your `entari.yml`.
43
+
44
+ ### Minimal Configuration
45
+
46
+ ```yaml
47
+ plugins:
48
+ entari_plugin_hyw:
49
+ model_name: google/gemini-3-flash-preview
50
+ api_key: "your-or-api-key-here"
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ### Commands
56
+
57
+ - **Text Query**
58
+ ```text
59
+ /q What's the latest news on Rust 1.83?
60
+ ```
61
+
62
+ - **Image Analysis**
63
+ *(Send an image with command, or reply to an image)*
64
+ ```text
65
+ /q [Image] Explain this error.
66
+ ```
67
+ - **Quote Query**
68
+ ```text
69
+ [quote: User Message] /q
70
+ ```
71
+
72
+ - **Follow-up**
73
+ *Reply to the bot's message to continue the conversation.*
74
+
75
+ ## Documentation for AI/LLMs
76
+
77
+ - [Instruction Guide (English)](docs/README_LLM_EN.md)
78
+ - [指导手册 (简体中文)](docs/README_LLM_CN.md)
79
+
80
+ ---
81
+
82
+ ## License
83
+
84
+ 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.6"
7
+ version = "3.3.8"
8
8
  description = "Use large language models to interpret chat messages"
9
9
  authors = [{name = "kumoSleeping", email = "zjr2992@outlook.com"}]
10
10
  dependencies = [
@@ -58,13 +58,11 @@ class HywConfig(BasicConfModel):
58
58
  base_url: str = "https://openrouter.ai/api/v1"
59
59
  vision_model_name: Optional[str] = None
60
60
  vision_api_key: Optional[str] = None
61
+ language: str = "Simplified Chinese"
61
62
  vision_base_url: Optional[str] = None
62
- vision_system_prompt: Optional[str] = None
63
- intruct_model_name: Optional[str] = None
64
- intruct_api_key: Optional[str] = None
65
- intruct_base_url: Optional[str] = None
66
- intruct_system_prompt: Optional[str] = None
67
- agent_system_prompt: Optional[str] = None
63
+ instruct_model_name: Optional[str] = None
64
+ instruct_api_key: Optional[str] = None
65
+ instruct_base_url: Optional[str] = None
68
66
  search_base_url: str = "https://lite.duckduckgo.com/lite/?q={query}"
69
67
  image_search_base_url: str = "https://duckduckgo.com/?q={query}&iax=images&ia=images"
70
68
  headless: bool = False
@@ -72,8 +70,10 @@ class HywConfig(BasicConfModel):
72
70
  icon: str = "openai"
73
71
  render_timeout_ms: int = 6000
74
72
  extra_body: Optional[Dict[str, Any]] = None
73
+ vision_extra_body: Optional[Dict[str, Any]] = None
74
+ instruct_extra_body: Optional[Dict[str, Any]] = None
75
75
  enable_browser_fallback: bool = False
76
- reaction: bool = True
76
+ reaction: bool = False
77
77
  quote: bool = True
78
78
  temperature: float = 0.4
79
79
  # Billing configuration (price per million tokens)
@@ -83,14 +83,14 @@ class HywConfig(BasicConfModel):
83
83
  vision_input_price: Optional[float] = None
84
84
  vision_output_price: Optional[float] = None
85
85
  # Instruct model pricing overrides (defaults to main model pricing if not set)
86
- intruct_input_price: Optional[float] = None
87
- intruct_output_price: Optional[float] = None
86
+ instruct_input_price: Optional[float] = None
87
+ instruct_output_price: Optional[float] = None
88
88
  # Provider Names
89
89
  search_name: str = "DuckDuckGo"
90
90
  search_provider: str = "crawl4ai" # crawl4ai | httpx | ddgs
91
91
  model_provider: Optional[str] = None
92
92
  vision_model_provider: Optional[str] = None
93
- intruct_model_provider: Optional[str] = None
93
+ instruct_model_provider: Optional[str] = None
94
94
 
95
95
 
96
96
 
@@ -12,27 +12,27 @@ class HYWConfig:
12
12
  fusion_mode: bool = False
13
13
  save_conversation: bool = False
14
14
  headless: bool = True
15
- intruct_model_name: Optional[str] = None
16
- intruct_api_key: Optional[str] = None
17
- intruct_base_url: Optional[str] = None
15
+ instruct_model_name: Optional[str] = None
16
+ instruct_api_key: Optional[str] = None
17
+ instruct_base_url: Optional[str] = None
18
18
  search_base_url: str = "https://lite.duckduckgo.com/lite/?q={query}"
19
19
  image_search_base_url: str = "https://duckduckgo.com/?q={query}&iax=images&ia=images"
20
20
  search_params: Optional[str] = None # e.g. "&kl=cn-zh" for China region
21
21
  search_limit: int = 8
22
22
  extra_body: Optional[Dict[str, Any]] = None
23
+ vision_extra_body: Optional[Dict[str, Any]] = None
24
+ instruct_extra_body: Optional[Dict[str, Any]] = None
23
25
  temperature: float = 0.4
24
26
  max_turns: int = 10
25
27
  icon: str = "openai" # logo for primary model
26
28
  vision_icon: Optional[str] = None # logo for vision model (falls back to icon when absent)
27
29
  instruct_icon: Optional[str] = None # logo for instruct model
28
30
  enable_browser_fallback: bool = False
29
- vision_system_prompt: Optional[str] = None
30
- intruct_system_prompt: Optional[str] = None
31
- agent_system_prompt: Optional[str] = None
31
+ language: str = "Simplified Chinese"
32
32
  input_price: Optional[float] = None # $ per 1M input tokens
33
33
  output_price: Optional[float] = None # $ per 1M output tokens
34
34
  vision_input_price: Optional[float] = None
35
35
  vision_output_price: Optional[float] = None
36
- intruct_input_price: Optional[float] = None
37
- intruct_output_price: Optional[float] = None
36
+ instruct_input_price: Optional[float] = None
37
+ instruct_output_price: Optional[float] = None
38
38