ommlds 0.0.0.dev443__py3-none-any.whl → 0.0.0.dev445__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.
@@ -199,7 +199,7 @@
199
199
  "module": ".minichain.backends.impls.mistral",
200
200
  "attr": null,
201
201
  "file": "ommlds/minichain/backends/impls/mistral.py",
202
- "line": 24,
202
+ "line": 29,
203
203
  "value": {
204
204
  "!.minichain.registries.manifests.RegistryManifest": {
205
205
  "module": "ommlds.minichain.backends.impls.mistral",
@@ -21,6 +21,11 @@ from ...chat.messages import UserMessage
21
21
  ##
22
22
 
23
23
 
24
+ # TODO: generalize lol
25
+ class TooManyRequestsMistralError(Exception):
26
+ pass
27
+
28
+
24
29
  # @omlish-manifest $.minichain.registries.manifests.RegistryManifest(
25
30
  # name='mistral',
26
31
  # type='ChatChoicesService',
@@ -79,6 +84,9 @@ class MistralChatChoicesService:
79
84
  },
80
85
  )
81
86
 
87
+ if resp.status == 429:
88
+ raise TooManyRequestsMistralError
89
+
82
90
  resp_dct = json.loads(check.not_none(resp.data).decode('utf-8'))
83
91
 
84
92
  return ChatChoicesResponse([
@@ -1,7 +1,7 @@
1
1
  # ruff: noqa: UP028
2
2
  import typing as ta
3
3
 
4
- from ..resources import Resources
4
+ from ..resources import UseResources
5
5
  from ..services import Request
6
6
  from ..services import Service
7
7
  from ..types import Output
@@ -44,7 +44,7 @@ class WrappedStreamService(ta.Generic[StreamRequestT, V, OutputT, StreamOutputT]
44
44
  #
45
45
 
46
46
  async def invoke(self, request: StreamRequestT) -> StreamResponse[V, OutputT, StreamOutputT]:
47
- async with Resources.new() as rs:
47
+ async with UseResources.or_new(request.options) as rs: # noqa
48
48
  in_resp = await self._inner.invoke(await self._process_request(request))
49
49
  in_vs = await rs.enter_async_context(in_resp.v)
50
50
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ommlds
3
- Version: 0.0.0.dev443
3
+ Version: 0.0.0.dev445
4
4
  Summary: ommlds
5
5
  Author: wrmsr
6
6
  License-Expression: BSD-3-Clause
@@ -14,8 +14,8 @@ Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Python: >=3.13
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: omdev==0.0.0.dev443
18
- Requires-Dist: omlish==0.0.0.dev443
17
+ Requires-Dist: omdev==0.0.0.dev445
18
+ Requires-Dist: omlish==0.0.0.dev445
19
19
  Provides-Extra: all
20
20
  Requires-Dist: llama-cpp-python~=0.3; extra == "all"
21
21
  Requires-Dist: mlx~=0.29; extra == "all"
@@ -1,4 +1,4 @@
1
- ommlds/.omlish-manifests.json,sha256=UfOa-wySWiPmKtp2MqM1dvOCDiyaxDOFK29yBFRzKPE,17481
1
+ ommlds/.omlish-manifests.json,sha256=F_mMa6P17FqHpbqQh1qWiqAgXIBnJrNfDML615bnPKk,17481
2
2
  ommlds/__about__.py,sha256=Z9VIVQnuNBbIYEtIm9XZU4T2QGRqMNjtmQX2OOTaUc0,1759
3
3
  ommlds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  ommlds/huggingface.py,sha256=JfEyfKOxU3-SY_ojtXBJFNeD-NIuKjvMe3GL3e93wNA,1175
@@ -121,7 +121,7 @@ ommlds/minichain/backends/catalogs/base.py,sha256=Yw9K2A1zSFzQqZjqW5s0IV6h9DnbyT
121
121
  ommlds/minichain/backends/catalogs/simple.py,sha256=KJLKEOYqzsekchxEjqIL0yWqlGvUu97PsRvQUIoXXc4,1472
122
122
  ommlds/minichain/backends/catalogs/strings.py,sha256=G7oQPaPfwBQ1CUNVvptW8M-ipesYXwAtS88UbOK2ZHw,1714
123
123
  ommlds/minichain/backends/impls/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
- ommlds/minichain/backends/impls/mistral.py,sha256=_rRpiw3_IShUlIGeQJA88I8rEuQli5ZQgQDDxNp5bx8,2489
124
+ ommlds/minichain/backends/impls/mistral.py,sha256=CqQIyH7UF7lNMZjzmrzTdBVf3LnpHeaifSfMh7rcTqU,2647
125
125
  ommlds/minichain/backends/impls/sqlite.py,sha256=NOFm_fgr-OZ8mo7etj0zwvxsDnidRwKzhdDom58e6ks,2157
126
126
  ommlds/minichain/backends/impls/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  ommlds/minichain/backends/impls/anthropic/chat.py,sha256=eyh7hWADTcQiMAHjYgjwoZZcpVxHLUhqSJhuraw27K8,3712
@@ -242,7 +242,7 @@ ommlds/minichain/services/responses.py,sha256=4W6Z4Fx4_GFqKgle27OeLr0zzjVTA0pkZr
242
242
  ommlds/minichain/services/services.py,sha256=WjkQNYIp87SflLSReOHMkG2qIVAOem6vsrs_2NxWN_M,325
243
243
  ommlds/minichain/stream/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
244
244
  ommlds/minichain/stream/services.py,sha256=oOdJ-GpkeXpb-kqEY7FZi_J0NzbVJk5VpPUk7ZIRFt4,5020
245
- ommlds/minichain/stream/wrap.py,sha256=B9jyUBmeD6KTan6XD4kNe_khjr0w0juck9FyBtR-HI8,2009
245
+ ommlds/minichain/stream/wrap.py,sha256=nQC0aCi49I18nF0Yx8qiiLkhIAECV6s6o4pvOy5Kx98,2041
246
246
  ommlds/minichain/text/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
247
247
  ommlds/minichain/text/applypatch.py,sha256=YIN5JChJ0FXyK1I6OiAHQmE7BT-exHfaAMM9ay7ylyc,17705
248
248
  ommlds/minichain/text/toolparsing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -299,9 +299,9 @@ ommlds/wiki/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
299
299
  ommlds/wiki/utils/io.py,sha256=UKgDJGtmpnWvIqVd2mJc2QNPOqlToEY1GEveNp6_pMo,7088
300
300
  ommlds/wiki/utils/progress.py,sha256=EhvKcMFYtsarCQhIahlO6f0SboyAKP3UwUyrnVnP-Vk,3222
301
301
  ommlds/wiki/utils/xml.py,sha256=vVV8Ctn13aaRM9eYfs9Wd6rHn5WOCEUzQ44fIhOvJdg,3754
302
- ommlds-0.0.0.dev443.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
303
- ommlds-0.0.0.dev443.dist-info/METADATA,sha256=7kkg5qkXPTJymBKRtYsIJAoxGsciQx_I7MDodtdXano,3224
304
- ommlds-0.0.0.dev443.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
305
- ommlds-0.0.0.dev443.dist-info/entry_points.txt,sha256=Z5YWtX7ClfiCKdW-dd_CSVvM0h4yQpJPi-2G3q6gNFo,35
306
- ommlds-0.0.0.dev443.dist-info/top_level.txt,sha256=Rbnk5d5wi58vnAXx13WFZqdQ4VX8hBCS2hEL3WeXOhY,7
307
- ommlds-0.0.0.dev443.dist-info/RECORD,,
302
+ ommlds-0.0.0.dev445.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
303
+ ommlds-0.0.0.dev445.dist-info/METADATA,sha256=3gBk3VJaTAXENiec6FZ8zAClGnIb8AqH8mlqZKc6Miw,3224
304
+ ommlds-0.0.0.dev445.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
305
+ ommlds-0.0.0.dev445.dist-info/entry_points.txt,sha256=Z5YWtX7ClfiCKdW-dd_CSVvM0h4yQpJPi-2G3q6gNFo,35
306
+ ommlds-0.0.0.dev445.dist-info/top_level.txt,sha256=Rbnk5d5wi58vnAXx13WFZqdQ4VX8hBCS2hEL3WeXOhY,7
307
+ ommlds-0.0.0.dev445.dist-info/RECORD,,