aient 1.0.95__py3-none-any.whl → 1.0.96__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.
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.0.95
3
+ Version: 1.0.96
4
4
  Summary: Aient: The Awakening of Agent.
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -9,7 +9,6 @@ Requires-Dist: httpx
9
9
  Requires-Dist: pillow
10
10
  Requires-Dist: msgspec
11
11
  Requires-Dist: fastapi
12
- Requires-Dist: PyExecJS
13
12
  Requires-Dist: requests
14
13
  Requires-Dist: html2text
15
14
  Requires-Dist: httpx-socks
@@ -30,15 +30,15 @@ aient/plugins/list_directory.py,sha256=5ubm-mfrj-tanGSDp4M_Tmb6vQb3dx2-XVfQ2yL2G
30
30
  aient/plugins/read_file.py,sha256=cJxGnhcz1_gjkgeemVyixLUiCvf-dWm-UtDfrbFdlLE,4857
31
31
  aient/plugins/registry.py,sha256=YknzhieU_8nQ3oKlUSSWDB4X7t2Jx0JnqT2Jd9Xsvfk,3574
32
32
  aient/plugins/run_python.py,sha256=dgcUwBunMuDkaSKR5bToudVzSdrXVewktDDFUz_iIOQ,4589
33
- aient/plugins/websearch.py,sha256=a-JJZjEZ5MEQ9WBMkD7okBHYehLSzApoLMiyqBnxDqs,15193
33
+ aient/plugins/websearch.py,sha256=I4tYU7CGLdyG6Hd3yK19V-PoG5IbFI9FEEVggyrshRg,15227
34
34
  aient/plugins/write_file.py,sha256=qmT6iQ3mDyVAa9Sld1jfJq0KPZj0w2kRIHq0JyjpGeA,1853
35
35
  aient/prompt/__init__.py,sha256=GBtn6-JDT8KHFCcuPpfSNE_aGddg5p4FEyMCy4BfwGs,20
36
36
  aient/prompt/agent.py,sha256=3VycHGnUq9OdR5pd_RM0AeLESlpAgBcmzrsesfq82X0,23856
37
37
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
39
39
  aient/utils/scripts.py,sha256=JbYHsU3LLtxBcuO_2MWbSgpHpCgtVQe9FGEFJpUyejc,25926
40
- aient-1.0.95.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
- aient-1.0.95.dist-info/METADATA,sha256=HbwsFj_m6N-d67WxvnwsrYQRHjHbMN5Y4ePXcte0gRI,4969
42
- aient-1.0.95.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
43
- aient-1.0.95.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
- aient-1.0.95.dist-info/RECORD,,
40
+ aient-1.0.96.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
41
+ aient-1.0.96.dist-info/METADATA,sha256=tUjeMs8W1DrH8grCIG-jn7zTnWoX9QDTGLuMo2TdLAo,4945
42
+ aient-1.0.96.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
43
+ aient-1.0.96.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
44
+ aient-1.0.96.dist-info/RECORD,,
File without changes