entari-plugin-hyw 4.0.0rc17__py3-none-any.whl → 4.0.0rc19__py3-none-any.whl
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.
- entari_plugin_hyw-4.0.0rc19.dist-info/METADATA +26 -0
- entari_plugin_hyw-4.0.0rc19.dist-info/RECORD +4 -0
- entari_plugin_hyw-4.0.0rc19.dist-info/top_level.txt +1 -0
- entari_plugin_hyw/__init__.py +0 -914
- entari_plugin_hyw/filters.py +0 -83
- entari_plugin_hyw/history.py +0 -251
- entari_plugin_hyw/misc.py +0 -214
- entari_plugin_hyw/search_cache.py +0 -253
- entari_plugin_hyw-4.0.0rc17.dist-info/METADATA +0 -119
- entari_plugin_hyw-4.0.0rc17.dist-info/RECORD +0 -52
- entari_plugin_hyw-4.0.0rc17.dist-info/top_level.txt +0 -2
- hyw_core/__init__.py +0 -94
- hyw_core/agent.py +0 -876
- hyw_core/browser_control/__init__.py +0 -63
- hyw_core/browser_control/assets/card-dist/index.html +0 -429
- hyw_core/browser_control/assets/card-dist/logos/anthropic.svg +0 -1
- hyw_core/browser_control/assets/card-dist/logos/cerebras.svg +0 -9
- hyw_core/browser_control/assets/card-dist/logos/deepseek.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/gemini.svg +0 -1
- hyw_core/browser_control/assets/card-dist/logos/google.svg +0 -1
- hyw_core/browser_control/assets/card-dist/logos/grok.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/huggingface.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/microsoft.svg +0 -15
- hyw_core/browser_control/assets/card-dist/logos/minimax.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/mistral.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/nvida.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/openai.svg +0 -1
- hyw_core/browser_control/assets/card-dist/logos/openrouter.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/perplexity.svg +0 -24
- hyw_core/browser_control/assets/card-dist/logos/qwen.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/xai.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/xiaomi.png +0 -0
- hyw_core/browser_control/assets/card-dist/logos/zai.png +0 -0
- hyw_core/browser_control/assets/card-dist/vite.svg +0 -1
- hyw_core/browser_control/engines/__init__.py +0 -15
- hyw_core/browser_control/engines/base.py +0 -13
- hyw_core/browser_control/engines/default.py +0 -166
- hyw_core/browser_control/engines/duckduckgo.py +0 -171
- hyw_core/browser_control/landing.html +0 -172
- hyw_core/browser_control/manager.py +0 -173
- hyw_core/browser_control/renderer.py +0 -446
- hyw_core/browser_control/service.py +0 -1002
- hyw_core/config.py +0 -154
- hyw_core/core.py +0 -454
- hyw_core/crawling/__init__.py +0 -18
- hyw_core/crawling/completeness.py +0 -437
- hyw_core/crawling/models.py +0 -88
- hyw_core/definitions.py +0 -166
- hyw_core/image_cache.py +0 -274
- hyw_core/pipeline.py +0 -502
- hyw_core/search.py +0 -169
- hyw_core/stages/__init__.py +0 -21
- hyw_core/stages/base.py +0 -95
- hyw_core/stages/summary.py +0 -218
- {entari_plugin_hyw-4.0.0rc17.dist-info → entari_plugin_hyw-4.0.0rc19.dist-info}/WHEEL +0 -0
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Search Result Cache
|
|
3
|
-
|
|
4
|
-
Caches search results in memory for 10 minutes to support
|
|
5
|
-
deep query operations on search results.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
import time
|
|
9
|
-
import base64
|
|
10
|
-
import io
|
|
11
|
-
from dataclasses import dataclass, field
|
|
12
|
-
from typing import Dict, List, Any, Optional
|
|
13
|
-
|
|
14
|
-
from loguru import logger
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@dataclass
|
|
18
|
-
class CacheEntry:
|
|
19
|
-
"""A cached search result entry."""
|
|
20
|
-
results: List[Dict[str, Any]]
|
|
21
|
-
query: str
|
|
22
|
-
timestamp: float = field(default_factory=time.time)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@dataclass
|
|
26
|
-
class ScreenshotCacheEntry:
|
|
27
|
-
"""A cached full screenshot."""
|
|
28
|
-
screenshot_b64: str
|
|
29
|
-
url: str
|
|
30
|
-
timestamp: float = field(default_factory=time.time)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class SearchResultCache:
|
|
34
|
-
"""
|
|
35
|
-
In-memory cache for search results with TTL-based expiration.
|
|
36
|
-
|
|
37
|
-
Cleanup is lazy - performed at the end of each request.
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
def __init__(self, ttl_seconds: float = 600.0): # 10 minutes default
|
|
41
|
-
self._cache: Dict[str, CacheEntry] = {}
|
|
42
|
-
self._screenshot_cache: Dict[str, ScreenshotCacheEntry] = {} # screenshot_id -> full screenshot
|
|
43
|
-
self._screenshot_counter: int = 0
|
|
44
|
-
self.ttl_seconds = ttl_seconds
|
|
45
|
-
|
|
46
|
-
def store(self, message_id: str, results: List[Dict[str, Any]], query: str):
|
|
47
|
-
"""
|
|
48
|
-
Store search results associated with a message ID.
|
|
49
|
-
|
|
50
|
-
Args:
|
|
51
|
-
message_id: The sent message ID that contains the search results image
|
|
52
|
-
results: List of search result dicts with url, title, content, etc.
|
|
53
|
-
query: The original search query
|
|
54
|
-
"""
|
|
55
|
-
self._cache[message_id] = CacheEntry(
|
|
56
|
-
results=results,
|
|
57
|
-
query=query,
|
|
58
|
-
timestamp=time.time()
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
def get(self, message_id: str) -> Optional[CacheEntry]:
|
|
62
|
-
"""
|
|
63
|
-
Get cached search results for a message ID.
|
|
64
|
-
|
|
65
|
-
Returns None if not found or expired.
|
|
66
|
-
"""
|
|
67
|
-
entry = self._cache.get(message_id)
|
|
68
|
-
if entry is None:
|
|
69
|
-
return None
|
|
70
|
-
|
|
71
|
-
# Check expiration
|
|
72
|
-
if time.time() - entry.timestamp > self.ttl_seconds:
|
|
73
|
-
del self._cache[message_id]
|
|
74
|
-
return None
|
|
75
|
-
|
|
76
|
-
return entry
|
|
77
|
-
|
|
78
|
-
def store_screenshot(self, screenshot_b64: str, url: str) -> str:
|
|
79
|
-
"""
|
|
80
|
-
Store a full screenshot and return its cache ID.
|
|
81
|
-
|
|
82
|
-
Args:
|
|
83
|
-
screenshot_b64: Base64 encoded full screenshot
|
|
84
|
-
url: The URL that was screenshotted
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
A short cache ID for referencing this screenshot
|
|
88
|
-
"""
|
|
89
|
-
self._screenshot_counter += 1
|
|
90
|
-
cache_id = f"ss{self._screenshot_counter:04x}"
|
|
91
|
-
self._screenshot_cache[cache_id] = ScreenshotCacheEntry(
|
|
92
|
-
screenshot_b64=screenshot_b64,
|
|
93
|
-
url=url,
|
|
94
|
-
timestamp=time.time()
|
|
95
|
-
)
|
|
96
|
-
return cache_id
|
|
97
|
-
|
|
98
|
-
def get_screenshot(self, cache_id: str) -> Optional[str]:
|
|
99
|
-
"""
|
|
100
|
-
Get a cached full screenshot by ID.
|
|
101
|
-
|
|
102
|
-
Returns:
|
|
103
|
-
Base64 encoded screenshot or None if not found/expired
|
|
104
|
-
"""
|
|
105
|
-
entry = self._screenshot_cache.get(cache_id)
|
|
106
|
-
if entry is None:
|
|
107
|
-
return None
|
|
108
|
-
|
|
109
|
-
if time.time() - entry.timestamp > self.ttl_seconds:
|
|
110
|
-
del self._screenshot_cache[cache_id]
|
|
111
|
-
return None
|
|
112
|
-
|
|
113
|
-
return entry.screenshot_b64
|
|
114
|
-
|
|
115
|
-
def cleanup(self):
|
|
116
|
-
"""
|
|
117
|
-
Remove all expired entries.
|
|
118
|
-
|
|
119
|
-
Called lazily at the end of each request.
|
|
120
|
-
"""
|
|
121
|
-
now = time.time()
|
|
122
|
-
expired_keys = [
|
|
123
|
-
k for k, v in self._cache.items()
|
|
124
|
-
if now - v.timestamp > self.ttl_seconds
|
|
125
|
-
]
|
|
126
|
-
for k in expired_keys:
|
|
127
|
-
del self._cache[k]
|
|
128
|
-
|
|
129
|
-
# Also cleanup screenshot cache
|
|
130
|
-
expired_ss = [
|
|
131
|
-
k for k, v in self._screenshot_cache.items()
|
|
132
|
-
if now - v.timestamp > self.ttl_seconds
|
|
133
|
-
]
|
|
134
|
-
for k in expired_ss:
|
|
135
|
-
del self._screenshot_cache[k]
|
|
136
|
-
|
|
137
|
-
def __len__(self) -> int:
|
|
138
|
-
return len(self._cache)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
def crop_to_square_thumbnail(screenshot_b64: str, max_size: int = 400) -> Optional[str]:
|
|
142
|
-
"""
|
|
143
|
-
Crop a screenshot to a 1:1 square from the top and resize.
|
|
144
|
-
|
|
145
|
-
Args:
|
|
146
|
-
screenshot_b64: Base64 encoded image
|
|
147
|
-
max_size: Maximum dimension of the output square
|
|
148
|
-
|
|
149
|
-
Returns:
|
|
150
|
-
Base64 encoded cropped/resized image, or None on error
|
|
151
|
-
"""
|
|
152
|
-
try:
|
|
153
|
-
from PIL import Image
|
|
154
|
-
|
|
155
|
-
# Decode base64
|
|
156
|
-
img_data = base64.b64decode(screenshot_b64)
|
|
157
|
-
img = Image.open(io.BytesIO(img_data))
|
|
158
|
-
|
|
159
|
-
width, height = img.size
|
|
160
|
-
|
|
161
|
-
# Crop to square from top
|
|
162
|
-
square_size = min(width, height)
|
|
163
|
-
# Crop from top-left, taking full width if width < height
|
|
164
|
-
crop_box = (0, 0, square_size, square_size)
|
|
165
|
-
cropped = img.crop(crop_box)
|
|
166
|
-
|
|
167
|
-
# Resize if larger than max_size
|
|
168
|
-
if square_size > max_size:
|
|
169
|
-
cropped = cropped.resize((max_size, max_size), Image.Resampling.LANCZOS)
|
|
170
|
-
|
|
171
|
-
# Encode back to base64
|
|
172
|
-
buffer = io.BytesIO()
|
|
173
|
-
cropped.save(buffer, format='JPEG', quality=85)
|
|
174
|
-
return base64.b64encode(buffer.getvalue()).decode('utf-8')
|
|
175
|
-
|
|
176
|
-
except Exception as e:
|
|
177
|
-
logger.warning(f"Failed to crop screenshot: {e}")
|
|
178
|
-
return None
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
def parse_single_index(text: str) -> Optional[int]:
|
|
182
|
-
"""
|
|
183
|
-
Parse a single index from text like "1" or "3".
|
|
184
|
-
|
|
185
|
-
Args:
|
|
186
|
-
text: The text to parse
|
|
187
|
-
|
|
188
|
-
Returns:
|
|
189
|
-
0-based index or None if not a valid single index
|
|
190
|
-
"""
|
|
191
|
-
if not text:
|
|
192
|
-
return None
|
|
193
|
-
text = text.strip()
|
|
194
|
-
if text.isdigit():
|
|
195
|
-
idx = int(text)
|
|
196
|
-
if 1 <= idx <= 10: # 1-based, max 10 results
|
|
197
|
-
return idx - 1 # Convert to 0-based
|
|
198
|
-
return None
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
def parse_multi_indices(text: str, max_count: int = 3) -> Optional[List[int]]:
|
|
202
|
-
"""
|
|
203
|
-
Parse multiple indices from text like "1-2", "1,2,3", "1、2、5".
|
|
204
|
-
|
|
205
|
-
Supports:
|
|
206
|
-
- Range: "1-2", "2-4"
|
|
207
|
-
- Comma separated: "1,2,3", "1, 2, 3"
|
|
208
|
-
- Chinese comma: "1、2、5"
|
|
209
|
-
- Space separated: "1 2 3"
|
|
210
|
-
|
|
211
|
-
Args:
|
|
212
|
-
text: The text to parse
|
|
213
|
-
max_count: Maximum number of indices allowed (default 3), returns None if exceeded
|
|
214
|
-
|
|
215
|
-
Returns:
|
|
216
|
-
List of 0-based indices, or None if empty/invalid/exceeds max_count
|
|
217
|
-
"""
|
|
218
|
-
import re
|
|
219
|
-
|
|
220
|
-
if not text:
|
|
221
|
-
return None
|
|
222
|
-
|
|
223
|
-
text = text.strip()
|
|
224
|
-
if not text:
|
|
225
|
-
return None
|
|
226
|
-
|
|
227
|
-
indices = set()
|
|
228
|
-
|
|
229
|
-
# Check for range pattern: "1-3"
|
|
230
|
-
range_match = re.match(r'^(\d+)\s*[-–]\s*(\d+)$', text)
|
|
231
|
-
if range_match:
|
|
232
|
-
start, end = int(range_match.group(1)), int(range_match.group(2))
|
|
233
|
-
if 1 <= start <= 10 and 1 <= end <= 10 and start <= end:
|
|
234
|
-
indices.update(range(start - 1, end)) # 0-based
|
|
235
|
-
if len(indices) > max_count:
|
|
236
|
-
return None # Exceeds max
|
|
237
|
-
return sorted(indices)
|
|
238
|
-
return None
|
|
239
|
-
|
|
240
|
-
# Split by comma, Chinese comma, or space
|
|
241
|
-
parts = re.split(r'[,、\s]+', text)
|
|
242
|
-
for part in parts:
|
|
243
|
-
part = part.strip()
|
|
244
|
-
if part.isdigit():
|
|
245
|
-
idx = int(part)
|
|
246
|
-
if 1 <= idx <= 10:
|
|
247
|
-
indices.add(idx - 1) # 0-based
|
|
248
|
-
|
|
249
|
-
if indices:
|
|
250
|
-
if len(indices) > max_count:
|
|
251
|
-
return None # Exceeds max
|
|
252
|
-
return sorted(indices)
|
|
253
|
-
return None
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: entari_plugin_hyw
|
|
3
|
-
Version: 4.0.0rc17
|
|
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.13,>=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: DrissionPage>=4.1.1.2
|
|
24
|
-
Requires-Dist: trafilatura>=1.6.0
|
|
25
|
-
Requires-Dist: json-repair>=0.55.0
|
|
26
|
-
Requires-Dist: Pillow>=10.0.0
|
|
27
|
-
Provides-Extra: dev
|
|
28
|
-
Requires-Dist: entari-plugin-server>=0.5.0; extra == "dev"
|
|
29
|
-
Requires-Dist: satori-python-adapter-onebot11>=0.2.5; extra == "dev"
|
|
30
|
-
Requires-Dist: noneprompt; extra == "dev"
|
|
31
|
-
Requires-Dist: rich; extra == "dev"
|
|
32
|
-
|
|
33
|
-
# Entari Plugin HYW
|
|
34
|
-
|
|
35
|
-
[](https://badge.fury.io/py/entari-plugin-hyw)
|
|
36
|
-
[](https://opensource.org/licenses/MIT)
|
|
37
|
-
[](https://pypi.org/project/entari-plugin-hyw/)
|
|
38
|
-
|
|
39
|
-
**English** | [简体中文](docs/README_CN.md)
|
|
40
|
-
|
|
41
|
-
**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).
|
|
42
|
-
|
|
43
|
-
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.
|
|
44
|
-
|
|
45
|
-
<p align="center">
|
|
46
|
-
<img src="docs/demo_mockup.svg" width="800" />
|
|
47
|
-
</p>
|
|
48
|
-
|
|
49
|
-
## Features
|
|
50
|
-
|
|
51
|
-
- 📖 **Agentic Workflow**
|
|
52
|
-
Autonomous decision-making process to search, browse, and reason.
|
|
53
|
-
|
|
54
|
-
- 🎑 **Multi-Modal Support**
|
|
55
|
-
Native support for image analysis using Vision Language Models (VLMs).
|
|
56
|
-
|
|
57
|
-
- 🔍 **Web Search & Crawling**
|
|
58
|
-
Integrated **DuckDuckGo** and **Crawl4AI** for real-time information retrieval.
|
|
59
|
-
|
|
60
|
-
- 🎨 **Rich Rendering**
|
|
61
|
-
Responses are rendered as images containing Markdown, syntax-highlighted code, LaTeX math, and citation badges.
|
|
62
|
-
|
|
63
|
-
- 🔌 **Protocol Support**
|
|
64
|
-
Deep integration with OneBot 11 and Satori protocols, handling reply context and JSON cards perfectly.
|
|
65
|
-
|
|
66
|
-
## Installation
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
pip install entari-plugin-hyw
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## Configuration
|
|
73
|
-
|
|
74
|
-
Configure the plugin in your `entari.yml`.
|
|
75
|
-
|
|
76
|
-
### Minimal Configuration
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
plugins:
|
|
80
|
-
entari_plugin_hyw:
|
|
81
|
-
model_name: google/gemini-2.0-flash-exp
|
|
82
|
-
api_key: "your-or-api-key-here"
|
|
83
|
-
# Rendering Configuration
|
|
84
|
-
render_timeout_ms: 6000 # Browser wait timeout
|
|
85
|
-
render_image_timeout_ms: 3000 # Image load wait timeout
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Usage
|
|
89
|
-
|
|
90
|
-
### Commands
|
|
91
|
-
|
|
92
|
-
- **Text Query**
|
|
93
|
-
```text
|
|
94
|
-
/q What's the latest news on Rust 1.83?
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
- **Image Analysis**
|
|
98
|
-
*(Send an image with command, or reply to an image)*
|
|
99
|
-
```text
|
|
100
|
-
/q [Image] Explain this error.
|
|
101
|
-
```
|
|
102
|
-
- **Quote Query**
|
|
103
|
-
```text
|
|
104
|
-
[quote: User Message] /q
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
- **Follow-up**
|
|
108
|
-
*Reply to the bot's message to continue the conversation.*
|
|
109
|
-
|
|
110
|
-
## Documentation for AI/LLMs
|
|
111
|
-
|
|
112
|
-
- [Instruction Guide (English)](docs/README_LLM_EN.md)
|
|
113
|
-
- [指导手册 (简体中文)](docs/README_LLM_CN.md)
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## License
|
|
118
|
-
|
|
119
|
-
This project is licensed under the MIT License.
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
entari_plugin_hyw/__init__.py,sha256=unglikkK8GZ6wzJgmVZ5mMy4x9N1RegZWK9C2PSeNUI,35351
|
|
2
|
-
entari_plugin_hyw/filters.py,sha256=sQnLaiqqZ2NkykcH4QgzFImP-JW3uVU7l6iuAAyUsJg,3080
|
|
3
|
-
entari_plugin_hyw/history.py,sha256=0XJwbfvXH5T1EPt4G1J5wWMJsKi0FfmajY5cvw8CQWE,12065
|
|
4
|
-
entari_plugin_hyw/misc.py,sha256=5IqF5Z2C_6Ufy5TI89uX5hX5fVYcXOTZIQUIu_tvf54,6855
|
|
5
|
-
entari_plugin_hyw/search_cache.py,sha256=INRb3NERcPK812tNXn91yg3phRczSNiHU12B77HRzOw,7219
|
|
6
|
-
hyw_core/__init__.py,sha256=Jlr9Ic-BLOPTnff6OctUCdjDMdK4nssTF_vHie4QKTo,1958
|
|
7
|
-
hyw_core/agent.py,sha256=luKJR0MNrNMn3lzZ-3VuFFOr9OdIEPDJ3IA_XvUIYtQ,37843
|
|
8
|
-
hyw_core/config.py,sha256=DHxwToUVLm1nT88gG05e3hVzSLxXMk9BjgjAnhGCADk,4918
|
|
9
|
-
hyw_core/core.py,sha256=HaAAY2fpreW6p9anEB3LrAnUBtxQTavozBJPEAUrvwI,15684
|
|
10
|
-
hyw_core/definitions.py,sha256=KgWgS7trErTqoxVjgtlLoJr0_e2HbY3XUGnY_MQ_70Q,7751
|
|
11
|
-
hyw_core/image_cache.py,sha256=t8pr1kgH2ngK9IhrBAhzUqhBWERNztUywMzgCFZEtQk,9899
|
|
12
|
-
hyw_core/pipeline.py,sha256=ZWwF0DHa29-65lUMU1_Fem3xQmxl7X_vgeni0ErOb8Q,22826
|
|
13
|
-
hyw_core/search.py,sha256=cLx1rPpy8BH6WiOKudH_XcO-DhqEU-CHANRDlyEB3MY,7612
|
|
14
|
-
hyw_core/browser_control/__init__.py,sha256=IeMErRC6fbq1PJWNK3klSbarSrUwOM4yyd_kJ6uWCPM,1406
|
|
15
|
-
hyw_core/browser_control/landing.html,sha256=wgqldumdylz69T83pvOkrigT1Mdb9GY0_KU0ceLGwdY,4642
|
|
16
|
-
hyw_core/browser_control/manager.py,sha256=-dHb0FamRsLfuU3jqX5cKaDo8DOOFV32zY912GuMdXU,6048
|
|
17
|
-
hyw_core/browser_control/renderer.py,sha256=s-QNIU-NMVQGLd_drLmeERgHsTm6C9XYm78CObt2KXc,17409
|
|
18
|
-
hyw_core/browser_control/service.py,sha256=mo2qkFJgi5DkzURVD8QrIj3xdd_jKwiJSoTVEfFAsY0,46626
|
|
19
|
-
hyw_core/browser_control/assets/card-dist/index.html,sha256=MMMovCSWL8Q3xqGYNoMNoh6Rz_HITT8Q_vmv00suPE0,2213337
|
|
20
|
-
hyw_core/browser_control/assets/card-dist/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
|
21
|
-
hyw_core/browser_control/assets/card-dist/logos/anthropic.svg,sha256=ASsy1ypo3osNc3n-B0R81tk_dIFsVgg7qQORrd5T2kA,558
|
|
22
|
-
hyw_core/browser_control/assets/card-dist/logos/cerebras.svg,sha256=bpmiiYTODwc06knTmPj3GQ7NNtosMog5lkggvB_Z-7M,44166
|
|
23
|
-
hyw_core/browser_control/assets/card-dist/logos/deepseek.png,sha256=KWWAr9aeYMc6I07U_1qo7zcXO6e7-kfd9S2XjQumnf4,25338
|
|
24
|
-
hyw_core/browser_control/assets/card-dist/logos/gemini.svg,sha256=H74CoVmx5opcCtr3Ay3M09dpqL9cd9Whkx-M6an3t7s,599
|
|
25
|
-
hyw_core/browser_control/assets/card-dist/logos/google.svg,sha256=H74CoVmx5opcCtr3Ay3M09dpqL9cd9Whkx-M6an3t7s,599
|
|
26
|
-
hyw_core/browser_control/assets/card-dist/logos/grok.png,sha256=uSulvvDVqoA4RUOW0ZAkdvBVM2rpyGJRZIbn5dEFspw,362
|
|
27
|
-
hyw_core/browser_control/assets/card-dist/logos/huggingface.png,sha256=8eAudeftUDO11jf0coOscPeRkskCb7l9TNMx78q61mY,24564
|
|
28
|
-
hyw_core/browser_control/assets/card-dist/logos/microsoft.svg,sha256=-am_6N3UEQYSzldDg-xrdGYjTWsagH-3v4Q_eia1ymE,684
|
|
29
|
-
hyw_core/browser_control/assets/card-dist/logos/minimax.png,sha256=tWqVlMdFNPpP8zWWX9tvIsWXI9q76P7O3t3CEZO7NU0,1525
|
|
30
|
-
hyw_core/browser_control/assets/card-dist/logos/mistral.png,sha256=0vv7jPmPKiBRYVYYJxVL_wIH_qa_ZssIdV3NDO5vbmk,869
|
|
31
|
-
hyw_core/browser_control/assets/card-dist/logos/nvida.png,sha256=JMITdcyjR9Lz6Gub0n1_30d0ynvV1ZSCJRcjy23qgrA,1607
|
|
32
|
-
hyw_core/browser_control/assets/card-dist/logos/openai.svg,sha256=LhVwCR4qaXj6qHm31qniQTCkJ-FX932JLSycUis5kao,1692
|
|
33
|
-
hyw_core/browser_control/assets/card-dist/logos/openrouter.png,sha256=exxfjWGDWpYH-Vc8xJDbhNVeXFEVxnu6TMxYIBc1WmY,1665
|
|
34
|
-
hyw_core/browser_control/assets/card-dist/logos/perplexity.svg,sha256=mHWZFoeWmDYXOIDzm9pj6_sRotaI8xNy5Lkeg5Vzu70,555
|
|
35
|
-
hyw_core/browser_control/assets/card-dist/logos/qwen.png,sha256=eqLbnIPbjh2_PsODU_mmqjeD82xXj8fV_kN0fDrNaD0,38419
|
|
36
|
-
hyw_core/browser_control/assets/card-dist/logos/xai.png,sha256=uSulvvDVqoA4RUOW0ZAkdvBVM2rpyGJRZIbn5dEFspw,362
|
|
37
|
-
hyw_core/browser_control/assets/card-dist/logos/xiaomi.png,sha256=WHxlDFGU5FCjb-ure3ngdGG18-efYZUUfqA3_lqCUN0,4084
|
|
38
|
-
hyw_core/browser_control/assets/card-dist/logos/zai.png,sha256=K-gnabdsjMLInppHA1Op7Nyt33iegrx1x-yNlvCZ0Tc,2351
|
|
39
|
-
hyw_core/browser_control/engines/__init__.py,sha256=01-jOjvtQcqWIwwY56ql3j00oSHGE2XhDHjkIi1Ij3Q,284
|
|
40
|
-
hyw_core/browser_control/engines/base.py,sha256=q5y4SM1G6xS7-6TQ-nZz9iTWw3XonjJn01fWzoTxr6c,414
|
|
41
|
-
hyw_core/browser_control/engines/default.py,sha256=BlHCQI4-rN9cEzLLfqvRD4bvhyP2G2KUGlo92J4kFNw,6092
|
|
42
|
-
hyw_core/browser_control/engines/duckduckgo.py,sha256=QVYj1I6Fw6--2-f3DYdHVlOmeLPzet9qG4HUT7ynrSE,6789
|
|
43
|
-
hyw_core/crawling/__init__.py,sha256=W5Be02uQueAyADFhPXVbDAFpNUJ_W7KdMtMr923_N24,437
|
|
44
|
-
hyw_core/crawling/completeness.py,sha256=OKdS8XlYYWDU1Vl1k-u7yEFqppukuJv-YQB0Px5KC2Q,16371
|
|
45
|
-
hyw_core/crawling/models.py,sha256=pCKe0k9xT3taSAlTlh0PazcLV0xYsm8p3XIkLHGf-LM,2353
|
|
46
|
-
hyw_core/stages/__init__.py,sha256=W89cWpq-HBLi2FprtJQSjQNLzpbhM8ZCkqPG61D_imE,521
|
|
47
|
-
hyw_core/stages/base.py,sha256=EfnTkISXbBNxjARykqIhmMrVqw2tqZl7ozJbJEbRnhI,2806
|
|
48
|
-
hyw_core/stages/summary.py,sha256=D0XwhqmtoyovSXUWoa-_RxeoKWEkdjqMyoJV-gWQwvQ,8342
|
|
49
|
-
entari_plugin_hyw-4.0.0rc17.dist-info/METADATA,sha256=yJQI0rRb92QgqLRBnqS1VZ5zcn6j538KweZtiJh6nV4,3875
|
|
50
|
-
entari_plugin_hyw-4.0.0rc17.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
51
|
-
entari_plugin_hyw-4.0.0rc17.dist-info/top_level.txt,sha256=ah76OrufRX0okOl4Fv8MO6PXiT0IaZ1oG0eDrdAPoNo,27
|
|
52
|
-
entari_plugin_hyw-4.0.0rc17.dist-info/RECORD,,
|
hyw_core/__init__.py
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
hyw-core - Core LLM Pipeline and Browser Automation
|
|
3
|
-
|
|
4
|
-
This package provides:
|
|
5
|
-
- HywCore: Main service class with unified query interface
|
|
6
|
-
- HywCoreConfig: Configuration management with standalone/passthrough support
|
|
7
|
-
- QueryRequest/QueryResponse: Request/response data classes
|
|
8
|
-
- SearchService: Web search abstraction
|
|
9
|
-
- ModularPipeline: LLM pipeline orchestration
|
|
10
|
-
- browser_control: Browser automation subpackage
|
|
11
|
-
|
|
12
|
-
Usage:
|
|
13
|
-
from hyw_core import HywCore, HywCoreConfig, QueryRequest
|
|
14
|
-
|
|
15
|
-
# Standalone usage with YAML config
|
|
16
|
-
config = HywCoreConfig.from_yaml("config.yaml")
|
|
17
|
-
core = HywCore(config)
|
|
18
|
-
|
|
19
|
-
response = await core.query(QueryRequest(
|
|
20
|
-
user_input="What is Python?",
|
|
21
|
-
images=[],
|
|
22
|
-
conversation_history=[]
|
|
23
|
-
))
|
|
24
|
-
|
|
25
|
-
# Passthrough from parent package
|
|
26
|
-
config = HywCoreConfig.from_dict({
|
|
27
|
-
"model_name": parent_config.model_name,
|
|
28
|
-
"api_key": parent_config.api_key,
|
|
29
|
-
...
|
|
30
|
-
})
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
__version__ = "4.0.0-rc8"
|
|
34
|
-
|
|
35
|
-
# Core classes
|
|
36
|
-
from .core import HywCore, QueryRequest, QueryResponse
|
|
37
|
-
|
|
38
|
-
# Configuration
|
|
39
|
-
from .config import HywCoreConfig, ModelConfig
|
|
40
|
-
|
|
41
|
-
# Pipeline components
|
|
42
|
-
from .pipeline import ModularPipeline
|
|
43
|
-
from .search import SearchService
|
|
44
|
-
|
|
45
|
-
# Stage components
|
|
46
|
-
from .stages import (
|
|
47
|
-
BaseStage,
|
|
48
|
-
StageContext,
|
|
49
|
-
StageResult,
|
|
50
|
-
|
|
51
|
-
SummaryStage,
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
# Definitions
|
|
55
|
-
from .definitions import (
|
|
56
|
-
SUMMARY_REPORT_SP,
|
|
57
|
-
get_refuse_answer_tool,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
# Browser control is available as subpackage
|
|
61
|
-
from . import browser_control
|
|
62
|
-
|
|
63
|
-
__all__ = [
|
|
64
|
-
# Version
|
|
65
|
-
"__version__",
|
|
66
|
-
|
|
67
|
-
# Core
|
|
68
|
-
"HywCore",
|
|
69
|
-
"QueryRequest",
|
|
70
|
-
"QueryResponse",
|
|
71
|
-
|
|
72
|
-
# Configuration
|
|
73
|
-
"HywCoreConfig",
|
|
74
|
-
"ModelConfig",
|
|
75
|
-
|
|
76
|
-
# Pipeline
|
|
77
|
-
"ModularPipeline",
|
|
78
|
-
"SearchService",
|
|
79
|
-
|
|
80
|
-
# Stages
|
|
81
|
-
"BaseStage",
|
|
82
|
-
"StageContext",
|
|
83
|
-
"StageResult",
|
|
84
|
-
|
|
85
|
-
"SummaryStage",
|
|
86
|
-
|
|
87
|
-
# Definitions
|
|
88
|
-
"SUMMARY_REPORT_SP",
|
|
89
|
-
"get_refuse_answer_tool",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
# Subpackage
|
|
93
|
-
"browser_control",
|
|
94
|
-
]
|