lm-deluge 0.0.43__py3-none-any.whl → 0.0.44__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 lm-deluge might be problematic. Click here for more details.

lm_deluge/client.py CHANGED
@@ -1,5 +1,4 @@
1
1
  import asyncio
2
- import random
3
2
  from typing import Any, AsyncGenerator, Callable, Literal, Self, Sequence, overload
4
3
 
5
4
  import numpy as np
@@ -225,9 +224,10 @@ class _LLMClient(BaseModel):
225
224
  seconds_to_pause = tracker.seconds_to_pause
226
225
 
227
226
  if seconds_to_pause > 0:
227
+ print(f"Pausing for {seconds_to_pause} seconds to cool down.")
228
228
  await asyncio.sleep(seconds_to_pause)
229
229
  else:
230
- await asyncio.sleep(random.random())
230
+ await asyncio.sleep(30.0 / self.max_requests_per_minute)
231
231
 
232
232
  async def _execute_request(self, context: RequestContext) -> APIResponse:
233
233
  """Create and send a single API request using the provided context."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lm_deluge
3
- Version: 0.0.43
3
+ Version: 0.0.44
4
4
  Summary: Python utility for using LLM API models.
5
5
  Author-email: Benjamin Anderson <ben@trytaylor.ai>
6
6
  Requires-Python: >=3.10
@@ -3,7 +3,7 @@ lm_deluge/agent.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  lm_deluge/batches.py,sha256=rQocJLyIs3Ko_nRdAE9jT__5cKWYxiIRAH_Lw3L0E1k,24653
4
4
  lm_deluge/cache.py,sha256=VB1kv8rM2t5XWPR60uhszFcxLDnVKOe1oA5hYjVDjIo,4375
5
5
  lm_deluge/cli.py,sha256=Ilww5gOw3J5v0NReq_Ra4hhxU4BCIJBl1oTGxJZKedc,12065
6
- lm_deluge/client.py,sha256=UQaKlMN2D4SXRymGqS-18SuVZL1Fu8kIamr7i-n8BUI,33942
6
+ lm_deluge/client.py,sha256=7FMB4_4ARDQOH0DDbNRxWvfKlgE2dOEvhaCGUWjSUsM,34027
7
7
  lm_deluge/config.py,sha256=H1tQyJDNHGFuwxqQNL5Z-CjWAC0luHSBA3iY_pxmACM,932
8
8
  lm_deluge/embed.py,sha256=CO-TOlC5kOTAM8lcnicoG4u4K664vCBwHF1vHa-nAGg,13382
9
9
  lm_deluge/errors.py,sha256=oHjt7YnxWbh-eXMScIzov4NvpJMo0-2r5J6Wh5DQ1tk,209
@@ -64,8 +64,8 @@ lm_deluge/util/logprobs.py,sha256=UkBZakOxWluaLqHrjARu7xnJ0uCHVfLGHJdnYlEcutk,11
64
64
  lm_deluge/util/spatial.py,sha256=BsF_UKhE-x0xBirc-bV1xSKZRTUhsOBdGqsMKme20C8,4099
65
65
  lm_deluge/util/validation.py,sha256=hz5dDb3ebvZrZhnaWxOxbNSVMI6nmaOODBkk0htAUhs,1575
66
66
  lm_deluge/util/xml.py,sha256=Ft4zajoYBJR3HHCt2oHwGfymGLdvp_gegVmJ-Wqk4Ck,10547
67
- lm_deluge-0.0.43.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
68
- lm_deluge-0.0.43.dist-info/METADATA,sha256=CfkvGVJsRboHaKM0_S4PG7gIWfffmcTWmpypf9C0cZE,13443
69
- lm_deluge-0.0.43.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
- lm_deluge-0.0.43.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
71
- lm_deluge-0.0.43.dist-info/RECORD,,
67
+ lm_deluge-0.0.44.dist-info/licenses/LICENSE,sha256=uNNXGXPCw2TC7CUs7SEBkA-Mz6QBQFWUUEWDMgEs1dU,1058
68
+ lm_deluge-0.0.44.dist-info/METADATA,sha256=DH_0dZ0rYojkJmy1jOxTKGDEiKIuoX1a80ChkMVei_8,13443
69
+ lm_deluge-0.0.44.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
+ lm_deluge-0.0.44.dist-info/top_level.txt,sha256=hqU-TJX93yBwpgkDtYcXyLr3t7TLSCCZ_reytJjwBaE,10
71
+ lm_deluge-0.0.44.dist-info/RECORD,,