beswarm 0.1.39__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.95",
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,7 +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
8
  from .registry import register_tool
10
9
 
11
10
  class ThreadWithReturnValue(threading.Thread):
@@ -17,11 +16,7 @@ class ThreadWithReturnValue(threading.Thread):
17
16
  super().join()
18
17
  return self._return
19
18
 
20
- import re
21
19
  import httpx
22
- import lxml.html
23
- from lxml_html_clean import Cleaner
24
- from html2text import HTML2Text
25
20
  from textwrap import dedent
26
21
 
27
22
  def url_to_markdown(url):
@@ -33,6 +28,7 @@ def url_to_markdown(url):
33
28
  return "抱歉,目前无法访问该网页。"
34
29
  # body = lxml.html.fromstring(text).xpath('//body')
35
30
 
31
+ import lxml.html
36
32
  doc = lxml.html.fromstring(text)
37
33
  # 检查是否是GitHub raw文件格式(body > pre)
38
34
  if doc.xpath('//body/pre'):
@@ -44,6 +40,7 @@ def url_to_markdown(url):
44
40
  return f'<pre>{body}</pre>'
45
41
  # return body
46
42
  else:
43
+ from lxml_html_clean import Cleaner
47
44
  body = body[0]
48
45
  body = Cleaner(javascript=True, style=True).clean_html(body)
49
46
  return ''.join(lxml.html.tostring(c, encoding='unicode') for c in body)
@@ -56,6 +53,7 @@ def url_to_markdown(url):
56
53
 
57
54
  # 将HTML转换为Markdown
58
55
  def get_md(cts):
56
+ from html2text import HTML2Text
59
57
  h2t = HTML2Text(bodywidth=5000)
60
58
  h2t.ignore_links = True
61
59
  h2t.mark_code = True
@@ -82,6 +80,7 @@ def jina_ai_Web_crawler(url: str, isSearch=False) -> str:
82
80
  }
83
81
  result = ''
84
82
  try:
83
+ from bs4 import BeautifulSoup
85
84
  requests.packages.urllib3.disable_warnings()
86
85
  url = "https://r.jina.ai/" + url
87
86
  response = requests.get(url, headers=headers, verify=False, timeout=5, stream=True)
@@ -1,34 +1,30 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beswarm
3
- Version: 0.1.39
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
8
  Requires-Dist: fake-useragent>=2.2.0
10
9
  Requires-Dist: fastapi>=0.115.12
11
10
  Requires-Dist: grep-ast>=0.8.1
12
- Requires-Dist: html2text>=2025.4.15
13
11
  Requires-Dist: httpx>=0.28.1
14
12
  Requires-Dist: httpx-socks>=0.10.0
15
- Requires-Dist: lxml-html-clean>=0.4.2
16
13
  Requires-Dist: msgspec>=0.19.0
17
14
  Requires-Dist: networkx>=3.4.2
18
- Requires-Dist: numpy>=2.2.4
19
15
  Requires-Dist: pdfminer-six==20240706
20
16
  Requires-Dist: pillow>=11.2.1
21
- Requires-Dist: pip>=25.1.1
22
17
  Requires-Dist: pyautogui>=0.9.54
23
- Requires-Dist: pyexecjs>=1.5.1
24
18
  Requires-Dist: pygments>=2.19.1
25
19
  Requires-Dist: pyperclip>=1.9.0
26
20
  Requires-Dist: pytz>=2025.2
27
21
  Requires-Dist: requests>=2.32.3
28
- Requires-Dist: scipy>=1.15.2
29
22
  Requires-Dist: tqdm>=4.67.1
30
23
  Provides-Extra: search
24
+ Requires-Dist: beautifulsoup4>=4.13.4; extra == "search"
31
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"
32
28
 
33
29
  # beswarm
34
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=gX6fAYtVyLi9NHeEKPMGPF4IxtQ9MvEnJy1besWMS5U,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=a-JJZjEZ5MEQ9WBMkD7okBHYehLSzApoLMiyqBnxDqs,15193
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.39.dist-info/METADATA,sha256=pOFh4a12JYNDKCeFjK6k9LoB6JGlqvc7EFVNVSWsqg8,3208
131
- beswarm-0.1.39.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
132
- beswarm-0.1.39.dist-info/top_level.txt,sha256=pJw4O87wvt5882smuSO6DfByJz7FJ8SxxT8h9fHCmpo,8
133
- beswarm-0.1.39.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,,