beswarm 0.1.38__py3-none-any.whl → 0.1.40__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.
beswarm/aient/setup.py CHANGED
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
 
5
5
  setup(
6
6
  name="aient",
7
- version="1.0.94",
7
+ version="1.0.96",
8
8
  description="Aient: The Awakening of Agent.",
9
9
  long_description=Path.open(Path("README.md"), encoding="utf-8").read(),
10
10
  long_description_content_type="text/markdown",
@@ -5,8 +5,6 @@ import requests
5
5
  import threading
6
6
  import time as record_time
7
7
  from itertools import islice
8
- from bs4 import BeautifulSoup
9
- from duckduckgo_search import DDGS
10
8
  from .registry import register_tool
11
9
 
12
10
  class ThreadWithReturnValue(threading.Thread):
@@ -18,11 +16,7 @@ class ThreadWithReturnValue(threading.Thread):
18
16
  super().join()
19
17
  return self._return
20
18
 
21
- import re
22
19
  import httpx
23
- import lxml.html
24
- from lxml_html_clean import Cleaner
25
- from html2text import HTML2Text
26
20
  from textwrap import dedent
27
21
 
28
22
  def url_to_markdown(url):
@@ -34,6 +28,7 @@ def url_to_markdown(url):
34
28
  return "抱歉,目前无法访问该网页。"
35
29
  # body = lxml.html.fromstring(text).xpath('//body')
36
30
 
31
+ import lxml.html
37
32
  doc = lxml.html.fromstring(text)
38
33
  # 检查是否是GitHub raw文件格式(body > pre)
39
34
  if doc.xpath('//body/pre'):
@@ -45,6 +40,7 @@ def url_to_markdown(url):
45
40
  return f'<pre>{body}</pre>'
46
41
  # return body
47
42
  else:
43
+ from lxml_html_clean import Cleaner
48
44
  body = body[0]
49
45
  body = Cleaner(javascript=True, style=True).clean_html(body)
50
46
  return ''.join(lxml.html.tostring(c, encoding='unicode') for c in body)
@@ -57,6 +53,7 @@ def url_to_markdown(url):
57
53
 
58
54
  # 将HTML转换为Markdown
59
55
  def get_md(cts):
56
+ from html2text import HTML2Text
60
57
  h2t = HTML2Text(bodywidth=5000)
61
58
  h2t.ignore_links = True
62
59
  h2t.mark_code = True
@@ -83,6 +80,7 @@ def jina_ai_Web_crawler(url: str, isSearch=False) -> str:
83
80
  }
84
81
  result = ''
85
82
  try:
83
+ from bs4 import BeautifulSoup
86
84
  requests.packages.urllib3.disable_warnings()
87
85
  url = "https://r.jina.ai/" + url
88
86
  response = requests.get(url, headers=headers, verify=False, timeout=5, stream=True)
@@ -178,6 +176,7 @@ def get_url_content(url: str) -> str:
178
176
 
179
177
  def getddgsearchurl(query, max_results=4):
180
178
  try:
179
+ from duckduckgo_search import DDGS
181
180
  results = []
182
181
  with DDGS() as ddgs:
183
182
  ddgs_gen = ddgs.text(query, safesearch='Off', timelimit='y', backend="lite")
@@ -1,33 +1,30 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.1.38
3
+ Version: 0.1.40
4
4
  Summary: MAS
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
7
- Requires-Dist: beautifulsoup4>=4.13.4
8
7
  Requires-Dist: diskcache>=5.6.3
9
- Requires-Dist: duckduckgo-search==5.3.1
10
8
  Requires-Dist: fake-useragent>=2.2.0
11
9
  Requires-Dist: fastapi>=0.115.12
12
10
  Requires-Dist: grep-ast>=0.8.1
13
- Requires-Dist: html2text>=2025.4.15
14
11
  Requires-Dist: httpx>=0.28.1
15
12
  Requires-Dist: httpx-socks>=0.10.0
16
- Requires-Dist: lxml-html-clean>=0.4.2
17
13
  Requires-Dist: msgspec>=0.19.0
18
14
  Requires-Dist: networkx>=3.4.2
19
- Requires-Dist: numpy>=2.2.4
20
15
  Requires-Dist: pdfminer-six==20240706
21
16
  Requires-Dist: pillow>=11.2.1
22
- Requires-Dist: pip>=25.1.1
23
17
  Requires-Dist: pyautogui>=0.9.54
24
- Requires-Dist: pyexecjs>=1.5.1
25
18
  Requires-Dist: pygments>=2.19.1
26
19
  Requires-Dist: pyperclip>=1.9.0
27
20
  Requires-Dist: pytz>=2025.2
28
21
  Requires-Dist: requests>=2.32.3
29
- Requires-Dist: scipy>=1.15.2
30
22
  Requires-Dist: tqdm>=4.67.1
23
+ Provides-Extra: search
24
+ Requires-Dist: beautifulsoup4>=4.13.4; extra == "search"
25
+ Requires-Dist: duckduckgo-search==5.3.1; extra == "search"
26
+ Requires-Dist: html2text>=2025.4.15; extra == "search"
27
+ Requires-Dist: lxml-html-clean>=0.4.2; extra == "search"
31
28
 
32
29
  # beswarm
33
30
 
@@ -1,7 +1,7 @@
1
1
  beswarm/__init__.py,sha256=HZjUOJtZR5QhMuDbq-wukQQn1VrBusNWai_ysGo-VVI,20
2
2
  beswarm/utils.py,sha256=AdDCcqAIIKQEMl7PfryVgeT9G5sHe7QNsZnrvmTGA8E,283
3
3
  beswarm/aient/main.py,sha256=SiYAIgQlLJqYusnTVEJOx1WNkSJKMImhgn5aWjfroxg,3814
4
- beswarm/aient/setup.py,sha256=YAgceIK7MVm6FbCxH6-wz10BjoSX2wbYg6jfpbUgBxA,487
4
+ beswarm/aient/setup.py,sha256=IcqLy7EXcsJbtM5EymvKIR3F7hTIMy7xaDKTSxm039U,487
5
5
  beswarm/aient/src/aient/__init__.py,sha256=SRfF7oDVlOOAi6nGKiJIUK6B_arqYLO9iSMp-2IZZps,21
6
6
  beswarm/aient/src/aient/core/__init__.py,sha256=NxjebTlku35S4Dzr16rdSqSTWUvvwEeACe8KvHJnjPg,34
7
7
  beswarm/aient/src/aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
@@ -32,7 +32,7 @@ beswarm/aient/src/aient/plugins/list_directory.py,sha256=5ubm-mfrj-tanGSDp4M_Tmb
32
32
  beswarm/aient/src/aient/plugins/read_file.py,sha256=cJxGnhcz1_gjkgeemVyixLUiCvf-dWm-UtDfrbFdlLE,4857
33
33
  beswarm/aient/src/aient/plugins/registry.py,sha256=YknzhieU_8nQ3oKlUSSWDB4X7t2Jx0JnqT2Jd9Xsvfk,3574
34
34
  beswarm/aient/src/aient/plugins/run_python.py,sha256=dgcUwBunMuDkaSKR5bToudVzSdrXVewktDDFUz_iIOQ,4589
35
- beswarm/aient/src/aient/plugins/websearch.py,sha256=yiBzqXK5X220ibR-zko3VDsn4QOnLu1k6E2YOygCeTQ,15185
35
+ beswarm/aient/src/aient/plugins/websearch.py,sha256=I4tYU7CGLdyG6Hd3yK19V-PoG5IbFI9FEEVggyrshRg,15227
36
36
  beswarm/aient/src/aient/plugins/write_file.py,sha256=qmT6iQ3mDyVAa9Sld1jfJq0KPZj0w2kRIHq0JyjpGeA,1853
37
37
  beswarm/aient/src/aient/prompt/__init__.py,sha256=GBtn6-JDT8KHFCcuPpfSNE_aGddg5p4FEyMCy4BfwGs,20
38
38
  beswarm/aient/src/aient/prompt/agent.py,sha256=3VycHGnUq9OdR5pd_RM0AeLESlpAgBcmzrsesfq82X0,23856
@@ -127,7 +127,7 @@ beswarm/tools/repomap.py,sha256=CwvwoN5Swr42EzrORTTeV8MMb7mPviy4a4b0fxBu50k,4082
127
127
  beswarm/tools/search_arxiv.py,sha256=9slwBemXjEqrd7-YgVmyMijPXlkhZCybEDRVhWVQ9B0,7937
128
128
  beswarm/tools/think.py,sha256=WLw-7jNIsnS6n8MMSYUin_f-BGLENFmnKM2LISEp0co,1760
129
129
  beswarm/tools/worker.py,sha256=FfKCx7KFNbMRoAXtjU1_nJQjx9WHny7KBq8OXSYICJs,5334
130
- beswarm-0.1.38.dist-info/METADATA,sha256=F67KnWGHVHRPZJi-uQxVCaGGoe3IMcBgmBdiMPz0wCQ,3166
131
- beswarm-0.1.38.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
132
- beswarm-0.1.38.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
133
- beswarm-0.1.38.dist-info/RECORD,,
130
+ beswarm-0.1.40.dist-info/METADATA,sha256=X_HTASX4oiHvwNfH7eBT0OwNWTY9DOwX84IfE6t2bOw,3150
131
+ beswarm-0.1.40.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
132
+ beswarm-0.1.40.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
133
+ beswarm-0.1.40.dist-info/RECORD,,