aient 1.1.81__py3-none-any.whl → 1.1.82__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.
aient/core/utils.py CHANGED
@@ -169,7 +169,7 @@ def get_proxy(proxy, client_config = {}):
169
169
  }
170
170
  return client_config
171
171
 
172
- def update_initial_model(provider):
172
+ async def update_initial_model(provider):
173
173
  try:
174
174
  engine, stream_mode = get_engine(provider, endpoint=None, original_model="")
175
175
  # print("engine", engine, provider)
@@ -181,8 +181,8 @@ def update_initial_model(provider):
181
181
  before_v1 = api_url.split("/v1beta")[0]
182
182
  url = before_v1 + "/v1beta/models"
183
183
  params = {"key": api}
184
- with httpx.Client(**client_config) as client:
185
- response = client.get(url, params=params)
184
+ async with httpx.AsyncClient(**client_config) as client:
185
+ response = await client.get(url, params=params)
186
186
 
187
187
  original_models = response.json()
188
188
  if original_models.get("error"):
@@ -202,11 +202,11 @@ def update_initial_model(provider):
202
202
  headers = {"x-api-key": api, "anthropic-version": "2023-06-01"}
203
203
  else:
204
204
  headers = {"Authorization": f"Bearer {api}"}
205
- response = httpx.get(
206
- endpoint_models_url,
207
- headers=headers,
208
- **client_config
209
- )
205
+ async with httpx.AsyncClient(**client_config) as client:
206
+ response = await client.get(
207
+ endpoint_models_url,
208
+ headers=headers,
209
+ )
210
210
  models = response.json()
211
211
  if models.get("error"):
212
212
  logger.error({"error": models.get("error"), "endpoint": endpoint_models_url, "api": api})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aient
3
- Version: 1.1.81
3
+ Version: 1.1.82
4
4
  Summary: Aient: The Awakening of Agent.
5
5
  Requires-Python: >=3.11
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ aient/core/log_config.py,sha256=kz2_yJv1p-o3lUQOwA3qh-LSc3wMHv13iCQclw44W9c,274
4
4
  aient/core/models.py,sha256=KMlCRLjtq1wQHZTJGqnbWhPS2cHq6eLdnk7peKDrzR8,7490
5
5
  aient/core/request.py,sha256=QnDhyrjzcJOEQU2oauMQi_HHMRR5NxdkrX7nn5JMwTc,76675
6
6
  aient/core/response.py,sha256=ye6Ie5HevXVcH3X5V5BoOC5yDJMBKTKopWQzsCNs008,34977
7
- aient/core/utils.py,sha256=9r-Z4KqZXXBm7bUkPx-vOYqgn4CEkG-cRRYz_tl0QUg,28851
7
+ aient/core/utils.py,sha256=BwC23v1i__-HxF5vHOxZUfDOIIOsnqsiIW1HhKyBVbk,28934
8
8
  aient/core/test/test_base_api.py,sha256=pWnycRJbuPSXKKU9AQjWrMAX1wiLC_014Qc9hh5C2Pw,524
9
9
  aient/core/test/test_geminimask.py,sha256=HFX8jDbNg_FjjgPNxfYaR-0-roUrOO-ND-FVsuxSoiw,13254
10
10
  aient/core/test/test_image.py,sha256=_T4peNGdXKBHHxyQNx12u-NTyFE8TlYI6NvvagsG2LE,319
@@ -30,8 +30,8 @@ aient/plugins/write_file.py,sha256=Jt8fOEwqhYiSWpCbwfAr1xoi_BmFnx3076GMhuL06uI,3
30
30
  aient/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  aient/utils/prompt.py,sha256=UcSzKkFE4-h_1b6NofI6xgk3GoleqALRKY8VBaXLjmI,11311
32
32
  aient/utils/scripts.py,sha256=VqtK4RFEx7KxkmcqG3lFDS1DxoNlFFGErEjopVcc8IE,40974
33
- aient-1.1.81.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
34
- aient-1.1.81.dist-info/METADATA,sha256=EhWleC1wNEH3zGSYyqd6yliP2Zb_ANww70H37uCwhCU,4842
35
- aient-1.1.81.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
- aient-1.1.81.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
37
- aient-1.1.81.dist-info/RECORD,,
33
+ aient-1.1.82.dist-info/licenses/LICENSE,sha256=XNdbcWldt0yaNXXWB_Bakoqnxb3OVhUft4MgMA_71ds,1051
34
+ aient-1.1.82.dist-info/METADATA,sha256=WU1r-B44ZrSmBLiMxqvvltgSpGMxUFn9TEVWvfeZeI0,4842
35
+ aient-1.1.82.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
36
+ aient-1.1.82.dist-info/top_level.txt,sha256=3oXzrP5sAVvyyqabpeq8A2_vfMtY554r4bVE-OHBrZk,6
37
+ aient-1.1.82.dist-info/RECORD,,
File without changes