ommlds 0.0.0.dev467__py3-none-any.whl → 0.0.0.dev469__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 ommlds might be problematic. Click here for more details.

Files changed (36) hide show
  1. ommlds/.omlish-manifests.json +109 -2
  2. ommlds/__about__.py +2 -2
  3. ommlds/_hacks/__init__.py +4 -0
  4. ommlds/_hacks/funcs.py +110 -0
  5. ommlds/_hacks/names.py +158 -0
  6. ommlds/_hacks/params.py +73 -0
  7. ommlds/_hacks/patches.py +0 -3
  8. ommlds/backends/ollama/__init__.py +0 -0
  9. ommlds/backends/ollama/protocol.py +170 -0
  10. ommlds/backends/transformers/__init__.py +0 -0
  11. ommlds/backends/transformers/filecache.py +109 -0
  12. ommlds/backends/transformers/streamers.py +73 -0
  13. ommlds/cli/main.py +11 -5
  14. ommlds/cli/sessions/chat/backends/catalog.py +1 -1
  15. ommlds/cli/sessions/completion/session.py +1 -1
  16. ommlds/cli/sessions/embedding/session.py +1 -1
  17. ommlds/minichain/__init__.py +5 -0
  18. ommlds/minichain/backends/catalogs/base.py +14 -1
  19. ommlds/minichain/backends/catalogs/simple.py +2 -2
  20. ommlds/minichain/backends/catalogs/strings.py +9 -7
  21. ommlds/minichain/backends/impls/anthropic/stream.py +1 -2
  22. ommlds/minichain/backends/impls/google/stream.py +1 -2
  23. ommlds/minichain/backends/impls/llamacpp/chat.py +9 -0
  24. ommlds/minichain/backends/impls/llamacpp/stream.py +26 -10
  25. ommlds/minichain/backends/impls/ollama/__init__.py +0 -0
  26. ommlds/minichain/backends/impls/ollama/chat.py +199 -0
  27. ommlds/minichain/backends/impls/openai/stream.py +1 -2
  28. ommlds/minichain/backends/impls/transformers/transformers.py +134 -17
  29. ommlds/minichain/registries/globals.py +18 -4
  30. ommlds/minichain/standard.py +7 -0
  31. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/METADATA +7 -7
  32. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/RECORD +36 -26
  33. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/WHEEL +0 -0
  34. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/entry_points.txt +0 -0
  35. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/licenses/LICENSE +0 -0
  36. {ommlds-0.0.0.dev467.dist-info → ommlds-0.0.0.dev469.dist-info}/top_level.txt +0 -0
@@ -4,6 +4,7 @@ TODO:
4
4
  - https://huggingface.co/blog/aifeifei798/transformers-streaming-output
5
5
  """
6
6
  import sys
7
+ import threading
7
8
  import typing as ta
8
9
 
9
10
  import transformers as tfm
@@ -11,28 +12,50 @@ import transformers as tfm
11
12
  from omlish import check
12
13
  from omlish import lang
13
14
  from omlish import typedvalues as tv
15
+ from omlish.asyncs.asyncio.sync import AsyncioBufferRelay
14
16
 
17
+ from .....backends.transformers.filecache import file_cache_patch_context
18
+ from .....backends.transformers.streamers import CancellableTextStreamer
15
19
  from ....chat.choices.services import ChatChoicesRequest
16
20
  from ....chat.choices.services import ChatChoicesResponse
17
21
  from ....chat.choices.services import static_check_is_chat_choices_service
18
22
  from ....chat.choices.types import AiChoice
23
+ from ....chat.choices.types import ChatChoicesOutputs
19
24
  from ....chat.messages import AiMessage
20
25
  from ....chat.messages import Message
21
26
  from ....chat.messages import SystemMessage
22
27
  from ....chat.messages import ToolUseMessage
23
28
  from ....chat.messages import ToolUseResultMessage
24
29
  from ....chat.messages import UserMessage
30
+ from ....chat.stream.services import ChatChoicesStreamRequest
31
+ from ....chat.stream.services import ChatChoicesStreamResponse
32
+ from ....chat.stream.services import static_check_is_chat_choices_stream_service
33
+ from ....chat.stream.types import AiChoiceDeltas # noqa
34
+ from ....chat.stream.types import AiChoicesDeltas # noqa
35
+ from ....chat.stream.types import ContentAiChoiceDelta # noqa
25
36
  from ....completion import CompletionRequest
26
37
  from ....completion import CompletionResponse
27
38
  from ....completion import static_check_is_completion_service
28
39
  from ....configs import Config
29
40
  from ....models.configs import ModelPath
41
+ from ....resources import UseResources
42
+ from ....stream.services import StreamResponseSink
43
+ from ....stream.services import new_stream_response
30
44
  from ...impls.huggingface.configs import HuggingfaceHubToken
31
45
 
32
46
 
33
47
  ##
34
48
 
35
49
 
50
+ # @omlish-manifest $.minichain.backends.strings.manifests.BackendStringsManifest(
51
+ # ['ChatChoicesService', 'ChatChoicesStreamService'],
52
+ # 'transformers',
53
+ # )
54
+
55
+
56
+ ##
57
+
58
+
36
59
  class TransformersPipelineKwargs(Config, tv.ScalarTypedValue[ta.Mapping[str, ta.Any]]):
37
60
  pass
38
61
 
@@ -128,13 +151,10 @@ def build_chat_message(m: Message) -> ta.Mapping[str, ta.Any]:
128
151
  raise TypeError(m)
129
152
 
130
153
 
131
- # @omlish-manifest $.minichain.registries.manifests.RegistryManifest(
132
- # name='transformers',
133
- # aliases=['tfm'],
134
- # type='ChatChoicesService',
135
- # )
136
- @static_check_is_chat_choices_service
137
- class TransformersChatChoicesService(lang.ExitStacked):
154
+ ##
155
+
156
+
157
+ class BaseTransformersChatChoicesService(lang.ExitStacked):
138
158
  DEFAULT_MODEL: ta.ClassVar[str] = (
139
159
  'meta-llama/Llama-3.2-1B-Instruct'
140
160
  )
@@ -161,21 +181,118 @@ class TransformersChatChoicesService(lang.ExitStacked):
161
181
  for pkw_cfg in self._pipeline_kwargs:
162
182
  pkw.update(pkw_cfg.v)
163
183
 
164
- return tfm.pipeline(
165
- 'text-generation',
166
- **pkw,
167
- )
184
+ with file_cache_patch_context(
185
+ local_first=True,
186
+ local_config_present_is_authoritative=True,
187
+ ):
188
+ return tfm.pipeline(
189
+ 'text-generation',
190
+ **pkw,
191
+ )
192
+
193
+
194
+ ##
195
+
168
196
 
197
+ # @omlish-manifest $.minichain.registries.manifests.RegistryManifest(
198
+ # name='transformers',
199
+ # aliases=['tfm'],
200
+ # type='ChatChoicesService',
201
+ # )
202
+ @static_check_is_chat_choices_service
203
+ class TransformersChatChoicesService(BaseTransformersChatChoicesService):
169
204
  async def invoke(self, request: ChatChoicesRequest) -> ChatChoicesResponse:
170
205
  check.empty(request.options)
171
206
 
172
207
  pipeline = self._load_pipeline()
173
208
 
174
- output = pipeline(
175
- [
176
- build_chat_message(m)
177
- for m in request.v
178
- ],
209
+ inputs = [
210
+ build_chat_message(m)
211
+ for m in request.v
212
+ ]
213
+
214
+ outputs = pipeline(inputs)
215
+
216
+ gts = check.single(outputs)['generated_text']
217
+ ugt, agt = gts
218
+ check.state(ugt['role'] == 'user')
219
+ check.state(agt['role'] == 'assistant')
220
+
221
+ return ChatChoicesResponse([AiChoice([AiMessage(agt['content'])])])
222
+
223
+
224
+ ##
225
+
226
+
227
+ # @omlish-manifest $.minichain.registries.manifests.RegistryManifest(
228
+ # name='transformers',
229
+ # type='ChatChoicesStreamService',
230
+ # )
231
+ @static_check_is_chat_choices_stream_service
232
+ class TransformersChatChoicesStreamService(BaseTransformersChatChoicesService):
233
+ async def invoke(self, request: ChatChoicesStreamRequest) -> ChatChoicesStreamResponse:
234
+ check.empty(request.options)
235
+
236
+ pipeline = self._load_pipeline() # noqa
237
+
238
+ inputs = [ # noqa
239
+ build_chat_message(m)
240
+ for m in request.v
241
+ ]
242
+
243
+ relay: AsyncioBufferRelay = AsyncioBufferRelay()
244
+
245
+ def streamer_callback(text: str, *, stream_end: bool) -> None:
246
+ if text or stream_end:
247
+ relay.push(text, *([None] if stream_end else []))
248
+
249
+ streamer = CancellableTextStreamer(
250
+ check.not_none(pipeline.tokenizer), # type: ignore[arg-type]
251
+ streamer_callback, # noqa
252
+ skip_prompt=True,
253
+ skip_special_tokens=True,
179
254
  )
180
255
 
181
- return ChatChoicesResponse([AiChoice([output])])
256
+ async with UseResources.or_new(request.options) as rs:
257
+ thread = threading.Thread(
258
+ target=CancellableTextStreamer.ignoring_cancelled(pipeline),
259
+ args=(
260
+ inputs,
261
+ ),
262
+ kwargs=dict(
263
+ streamer=streamer,
264
+ ),
265
+ )
266
+
267
+ def stop_thread() -> None:
268
+ streamer.cancel()
269
+ # thread.join()
270
+
271
+ rs.enter_context(lang.defer(stop_thread))
272
+
273
+ thread.start()
274
+
275
+ async def inner(sink: StreamResponseSink[AiChoicesDeltas]) -> ta.Sequence[ChatChoicesOutputs] | None:
276
+ while True:
277
+ await relay.wait()
278
+ got = relay.swap()
279
+
280
+ if not got:
281
+ raise RuntimeError
282
+
283
+ if got[-1] is None:
284
+ out = ''.join(got[:-1])
285
+ end = True
286
+ else:
287
+ out = ''.join(got)
288
+ end = False
289
+
290
+ if out:
291
+ await sink.emit(AiChoicesDeltas([AiChoiceDeltas([ContentAiChoiceDelta(out)])]))
292
+
293
+ if end:
294
+ break
295
+
296
+ return []
297
+
298
+ return await new_stream_response(rs, inner)
@@ -98,20 +98,34 @@ def register_type(
98
98
 
99
99
 
100
100
  @ta.overload
101
- def registry_new(cls: type[T], name: str, *args: ta.Any, **kwargs: ta.Any) -> T:
101
+ def get_registry_cls(cls: type[T], name: str) -> type[T]:
102
102
  ...
103
103
 
104
104
 
105
105
  @ta.overload
106
- def registry_new(cls: ta.Any, name: str, *args: ta.Any, **kwargs: ta.Any) -> ta.Any:
106
+ def get_registry_cls(cls: ta.Any, name: str) -> ta.Any:
107
107
  ...
108
108
 
109
109
 
110
- def registry_new(cls, name, *args, **kwargs):
110
+ def get_registry_cls(cls, name, *args, **kwargs):
111
111
  be_cls = _GlobalRegistry.instance().get_registry_cls(cls, name)
112
112
  if isinstance(cls, type):
113
113
  be_cls = check.issubclass(be_cls, cls) # noqa
114
- return be_cls(*args, **kwargs)
114
+ return be_cls
115
+
116
+
117
+ @ta.overload
118
+ def registry_new(cls: type[T], name: str, *args: ta.Any, **kwargs: ta.Any) -> T:
119
+ ...
120
+
121
+
122
+ @ta.overload
123
+ def registry_new(cls: ta.Any, name: str, *args: ta.Any, **kwargs: ta.Any) -> ta.Any:
124
+ ...
125
+
126
+
127
+ def registry_new(cls, name, *args, **kwargs):
128
+ return get_registry_cls(cls, name)(*args, **kwargs)
115
129
 
116
130
 
117
131
  #
@@ -25,6 +25,13 @@ class Device(tv.UniqueScalarTypedValue[ta.Any], Config):
25
25
  ##
26
26
 
27
27
 
28
+ class ApiUrl(tv.UniqueScalarTypedValue[str], Config):
29
+ pass
30
+
31
+
32
+ ##
33
+
34
+
28
35
  @dc.dataclass(frozen=True)
29
36
  class SecretConfig(Config, lang.Abstract):
30
37
  v: sec.SecretRefOrStr = dc.field() | sec.secret_field
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ommlds
3
- Version: 0.0.0.dev467
3
+ Version: 0.0.0.dev469
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.dev467
18
- Requires-Dist: omlish==0.0.0.dev467
17
+ Requires-Dist: omdev==0.0.0.dev469
18
+ Requires-Dist: omlish==0.0.0.dev469
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"
@@ -26,8 +26,8 @@ Requires-Dist: tokenizers~=0.22; extra == "all"
26
26
  Requires-Dist: torch~=2.9; extra == "all"
27
27
  Requires-Dist: transformers~=4.57; extra == "all"
28
28
  Requires-Dist: sentence-transformers~=5.1; extra == "all"
29
- Requires-Dist: huggingface-hub~=0.35; extra == "all"
30
- Requires-Dist: datasets~=4.2; extra == "all"
29
+ Requires-Dist: huggingface-hub~=0.36; extra == "all"
30
+ Requires-Dist: datasets~=4.3; extra == "all"
31
31
  Requires-Dist: numpy>=1.26; extra == "all"
32
32
  Requires-Dist: pytesseract~=0.3; extra == "all"
33
33
  Requires-Dist: rapidocr-onnxruntime~=1.4; extra == "all"
@@ -47,8 +47,8 @@ Requires-Dist: torch~=2.9; extra == "backends"
47
47
  Requires-Dist: transformers~=4.57; extra == "backends"
48
48
  Requires-Dist: sentence-transformers~=5.1; extra == "backends"
49
49
  Provides-Extra: huggingface
50
- Requires-Dist: huggingface-hub~=0.35; extra == "huggingface"
51
- Requires-Dist: datasets~=4.2; extra == "huggingface"
50
+ Requires-Dist: huggingface-hub~=0.36; extra == "huggingface"
51
+ Requires-Dist: datasets~=4.3; extra == "huggingface"
52
52
  Provides-Extra: numpy
53
53
  Requires-Dist: numpy>=1.26; extra == "numpy"
54
54
  Provides-Extra: ocr
@@ -1,9 +1,12 @@
1
- ommlds/.omlish-manifests.json,sha256=MyJQsh5T1CMMXcGdxwqI9abQ8-j-ZlRGRluiikbeKRY,18414
2
- ommlds/__about__.py,sha256=uAJgr2I_m_oZPlV5P8XLFeYpBlEM-DdzeyF6O5OK_qs,1759
1
+ ommlds/.omlish-manifests.json,sha256=K1CQFRaaQ43_zlr1ekl2h-CMXQ_U9zA0xBIOB-e_u-8,21555
2
+ ommlds/__about__.py,sha256=t2rQF0yXpWFcCb2dvgzGR3I35HKGvGSn-EfhaUWVl5s,1759
3
3
  ommlds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  ommlds/huggingface.py,sha256=JfEyfKOxU3-SY_ojtXBJFNeD-NIuKjvMe3GL3e93wNA,1175
5
- ommlds/_hacks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- ommlds/_hacks/patches.py,sha256=HhoB-9IosLTgX1RANaEbyTTDolnqe1J84e2W0mSlmF8,2060
5
+ ommlds/_hacks/__init__.py,sha256=ajfw7dMKH8UuloeQ5MSxWwgAmdWf2v8gm-K3uLP9wtY,196
6
+ ommlds/_hacks/funcs.py,sha256=8XseIblP7yolDUD7WQSGn1LP90IQzByVejSzphAPDyM,2861
7
+ ommlds/_hacks/names.py,sha256=01XSF-Rd0nLGb7oA0Jg1R9MtkOk0jfUhIO5CPyA-s6M,4690
8
+ ommlds/_hacks/params.py,sha256=FihwXN6RAvQR1HqEemTRL_ivEr8WOlirH1sZ-lM3vgM,1725
9
+ ommlds/_hacks/patches.py,sha256=Dsz4GcgRXd1zi18jiDO2C_8IF12VTsysjthiOQz-h80,1871
7
10
  ommlds/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
11
  ommlds/backends/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
12
  ommlds/backends/anthropic/protocol/__init__.py,sha256=bWNQbfEt7jLss6s03c0sBRCsx32POdgkO5VeNe0K3SU,132
@@ -37,6 +40,8 @@ ommlds/backends/mlx/tokenization/detokenization/base.py,sha256=Tezf8Anh-w7BxpNQs
37
40
  ommlds/backends/mlx/tokenization/detokenization/bpe.py,sha256=cIw6-r-cyXTfZdyfGRgohrElMIqeLKfMRb8R1H_56nY,3659
38
41
  ommlds/backends/mlx/tokenization/detokenization/naive.py,sha256=6L-SvphzP1z16cmVB4QC9VraF7khE8ZcvKqIwwFqN6U,1779
39
42
  ommlds/backends/mlx/tokenization/detokenization/spm.py,sha256=IYSnEm-C0z_o5TKLJE_Rj6P0nNd-prT6psVPKsERWAE,1751
43
+ ommlds/backends/ollama/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ ommlds/backends/ollama/protocol.py,sha256=1rBZOIb080MsWMfgU4d59wDQhW5EiyBYKgnFbBnLatg,4437
40
45
  ommlds/backends/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
46
  ommlds/backends/openai/protocol/__init__.py,sha256=gYPUQ94GfoIAgU5TGoaC0OVGkWuplrHg-s83ynT9f-4,1750
42
47
  ommlds/backends/openai/protocol/_common.py,sha256=r4EXmw1fBFHjU5vbWTDvlM_fsafdIVg3d3PNw4F9m-Q,313
@@ -75,10 +80,13 @@ ommlds/backends/torch/__init__.py,sha256=Id8dKbxMLlp3ux62ohu9JKoXPSrM0ZXUK0eCDTY
75
80
  ommlds/backends/torch/backends.py,sha256=Bo-ZdW1n9NswvptT8bL9CssEOKwusDuBMaXVjRS8zrA,3528
76
81
  ommlds/backends/torch/devices.py,sha256=KWkeyArPdUwVqckQTJPkN-4GQdv39cpOgCMv_XfkLkQ,776
77
82
  ommlds/backends/torch/purge.py,sha256=sp6XUxNLoVCepxIPKw3tevHn-cQqgorILvIQzixauiI,1834
83
+ ommlds/backends/transformers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
+ ommlds/backends/transformers/filecache.py,sha256=ycfswt7f4qRrPSTFRhofXZaDBuDPpypEKwXzSBsBsu8,3317
85
+ ommlds/backends/transformers/streamers.py,sha256=Hu_9lp_kUilKjOfs7Ixqr2NoA5FuRn2eRh8JdvaBDYc,1688
78
86
  ommlds/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
87
  ommlds/cli/__main__.py,sha256=1ffCb0fcUOJMzxROJmJRXQ8PSOVYv7KrcuBtT95cf0c,140
80
88
  ommlds/cli/inject.py,sha256=WhTDabJz9b1NRRHVH-UyVN5nj6UncvIeTvgkGrcE9vc,666
81
- ommlds/cli/main.py,sha256=rOsdlBHHiF5ZjMBXSNojXFyiWin7pN6RJMZUwGEyXVs,5608
89
+ ommlds/cli/main.py,sha256=dTBJSxWdsS1pEqDY-vT_g2PC-aUkatVhq0XEW8zirQ0,5802
82
90
  ommlds/cli/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
91
  ommlds/cli/backends/inject.py,sha256=OVstNsoeVnprM9PBL_zP0N46KkoDg3_Wz90BWcQ7km4,1734
84
92
  ommlds/cli/backends/standard.py,sha256=HnammWyAXJHeqXJrAMBdarcT4Nyt2CxudZdD2fW_Y9M,631
@@ -91,7 +99,7 @@ ommlds/cli/sessions/chat/driver.py,sha256=ddnCYTKqWiPxV8U4UbFwb7E3yi81ItjZ9j3AJd
91
99
  ommlds/cli/sessions/chat/inject.py,sha256=7Yg6wUs2Oej4UjNZCAWCJCEsDJZWvT4G8XvkvVUMC7U,1928
92
100
  ommlds/cli/sessions/chat/session.py,sha256=eqwelLE74JFC-fBpk_hdwMD2nP4pLv3ZPwUn99200B8,521
93
101
  ommlds/cli/sessions/chat/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
- ommlds/cli/sessions/chat/backends/catalog.py,sha256=gc03dqXEUUSi4WCWJ30HrkHPWlAkZHXkj1pOq7KVakU,1764
102
+ ommlds/cli/sessions/chat/backends/catalog.py,sha256=-mth_gw2MTnlClGVIdjiOJn1g4B6G9SqZDsmg5Rg70Y,1764
95
103
  ommlds/cli/sessions/chat/backends/inject.py,sha256=VbZ-Fb679kTItRpAhIYCqSM8vXUFeRDQWssUfrFgGi8,882
96
104
  ommlds/cli/sessions/chat/backends/injection.py,sha256=GCn5OvNIEowgB70kQVuU84z3i8lLA4vOVkTZlQG8s0o,327
97
105
  ommlds/cli/sessions/chat/backends/types.py,sha256=5eImYHXLKqbC5MDrN443eMGamP9snCmV1n7LtAsqgPk,696
@@ -136,18 +144,18 @@ ommlds/cli/sessions/chat/tools/weather.py,sha256=vZXOHdRGGlkDEXasW5foc58MyEMOc79
136
144
  ommlds/cli/sessions/completion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
145
  ommlds/cli/sessions/completion/configs.py,sha256=KeOmvNrq6KkI96FaRRPnpWNx3yDlD-FgaiOwPEL9HPU,245
138
146
  ommlds/cli/sessions/completion/inject.py,sha256=qpyp2Ro0sPOIOssk-7eXOseKG1Fu_vf1zvyLjZi5qIE,564
139
- ommlds/cli/sessions/completion/session.py,sha256=YLq9beHxfgCAu8t9Xj54qQxXj8ebwqrcN8JsJ3_2KOw,1067
147
+ ommlds/cli/sessions/completion/session.py,sha256=H4k9_iWiseHcgTBURG5S9LLVJ7TkONA-AYu50WSpHp4,1067
140
148
  ommlds/cli/sessions/embedding/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
149
  ommlds/cli/sessions/embedding/configs.py,sha256=WwWwJ7GpUYUEOPcYr2EhNLV8m1cK6llp5N_bMnFX_cw,243
142
150
  ommlds/cli/sessions/embedding/inject.py,sha256=XYjqDT5GajZ0LNks36aZRNNKhH1m-xfAL1bbMxfISYQ,559
143
- ommlds/cli/sessions/embedding/session.py,sha256=SccMICjbS1BL7wMkDzd17d2TWRjbzAmMwFn_CjC2-a8,1039
151
+ ommlds/cli/sessions/embedding/session.py,sha256=BOaDRK40LjTGqz6piCMdxY3yQB5MSaUpWTJcWYNL5Yw,1039
144
152
  ommlds/cli/state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
145
153
  ommlds/cli/state/inject.py,sha256=-wqovpgxLYBpJkkCzscn2o6F6AD-agF8PoNjVac6FuQ,702
146
154
  ommlds/cli/state/storage.py,sha256=tRPmgCANRrw7A5Qr700OaH58F6S96O37I8Ivrbo7_gI,3001
147
155
  ommlds/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
156
  ommlds/datasets/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
149
157
  ommlds/datasets/lib/movies.py,sha256=LmdfoXsZU9XMM_r-sxCLv_s06BFzwWO4xUj6sc9XVcI,1961
150
- ommlds/minichain/__init__.py,sha256=EqNJpuMwqkkdlNmipjaoC30yAqH7c8oziszlkCcXBrQ,10982
158
+ ommlds/minichain/__init__.py,sha256=uruXAyfKzg_Ed3ZPkiNVopZugZV62-eqPOT1EtxljiA,11042
151
159
  ommlds/minichain/_marshal.py,sha256=n9PGWrHhvAmGIc7KDOYt3IF9Z6G0ncXskyICTp3Ji6k,1923
152
160
  ommlds/minichain/_typedvalues.py,sha256=Vl1Edt5khC0e5RPFBPmPCxn0IzrfVd0NHzAjAN2E6Kc,2183
153
161
  ommlds/minichain/completion.py,sha256=lQ0LfCIYZsvDqteHhhDIv16D2_gn_xMfEL0ouywE5Yo,1033
@@ -157,14 +165,14 @@ ommlds/minichain/json.py,sha256=0_5rV5Zi2qPOvXi2CLAc5DF7FN3jK3ABbjoKdjtTuVo,360
157
165
  ommlds/minichain/metadata.py,sha256=2jik8gEm_VMnknPuPwqRssTg0MClRFUrXz_IsyEgUt4,878
158
166
  ommlds/minichain/resources.py,sha256=HfcydnyFmXVRspYw-32-lvM_OfrZQdPEebAt3ivLev0,4436
159
167
  ommlds/minichain/search.py,sha256=azRzWcYhcm9IgSHquqLwtbwowtYCRAtPLSm7Gvt9iNo,1262
160
- ommlds/minichain/standard.py,sha256=uKXvdUNLxdUu7suCBsVOjJtnYVC2hjD_tmz3Ra7H6Jg,2510
168
+ ommlds/minichain/standard.py,sha256=cGXaGtC5iM9Q2lCcbhLtvEcPGKhcJUIh3UWyNgOssRM,2580
161
169
  ommlds/minichain/types.py,sha256=K6RRjpUi17UEG0cqPrrvbVANU0iRVh3WLiH-y6oEWFI,414
162
170
  ommlds/minichain/utils.py,sha256=NTsBu_pSZnLdZc1R1Se70rb_9J-IoB6VRwjhwzh3PwY,490
163
171
  ommlds/minichain/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
164
172
  ommlds/minichain/backends/catalogs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
165
- ommlds/minichain/backends/catalogs/base.py,sha256=Yw9K2A1zSFzQqZjqW5s0IV6h9DnbyT8LfDQpYaIfv2w,882
166
- ommlds/minichain/backends/catalogs/simple.py,sha256=KJLKEOYqzsekchxEjqIL0yWqlGvUu97PsRvQUIoXXc4,1472
167
- ommlds/minichain/backends/catalogs/strings.py,sha256=G7oQPaPfwBQ1CUNVvptW8M-ipesYXwAtS88UbOK2ZHw,1714
173
+ ommlds/minichain/backends/catalogs/base.py,sha256=TNdFrYYFEwp-rbmp-VHxUKIFCiVYhFPcu4PNhSaEHMA,1239
174
+ ommlds/minichain/backends/catalogs/simple.py,sha256=T6GeY902XPRjNnwX1AivunpkirLyxFg5rG2V2LA0Puo,1501
175
+ ommlds/minichain/backends/catalogs/strings.py,sha256=IHid5yRbHvkU5O5ypSMWAPcETLlvj1CXeIJ3mHrDyi8,1768
168
176
  ommlds/minichain/backends/impls/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
177
  ommlds/minichain/backends/impls/mistral.py,sha256=I_HTwXqAoQi2xyw_nLTeUamtOZLLl-oQZ234AVJZZLA,2649
170
178
  ommlds/minichain/backends/impls/sqlite.py,sha256=NOFm_fgr-OZ8mo7etj0zwvxsDnidRwKzhdDom58e6ks,2157
@@ -172,32 +180,34 @@ ommlds/minichain/backends/impls/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-
172
180
  ommlds/minichain/backends/impls/anthropic/chat.py,sha256=LVaRP_Pbz4UghSHD8GZ22hMWE4Rsd_6bSysgl2BR_AM,4166
173
181
  ommlds/minichain/backends/impls/anthropic/names.py,sha256=GPPeYt0CcDcDCR8I6BMd7bMjC_Zk_bjnLLpF9ClwXcg,1099
174
182
  ommlds/minichain/backends/impls/anthropic/protocol.py,sha256=whPVYuKShKiMCzasHl77sCIiymhzXj8mFZXEyhZvld8,3292
175
- ommlds/minichain/backends/impls/anthropic/stream.py,sha256=AvoLk25R7E_aSS1tAN-P-UKjhKPxYtQoeGakXvFdblI,8677
183
+ ommlds/minichain/backends/impls/anthropic/stream.py,sha256=4xa1LYsa1LLGYWlP2-RMk1ll4eyikkjlfJZ1fU5EEPM,8580
176
184
  ommlds/minichain/backends/impls/duckduckgo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
177
185
  ommlds/minichain/backends/impls/duckduckgo/search.py,sha256=igzeU9P9b1MMiu4KAJVS9H6KLIoPm68wXi4Kx3_DHyQ,940
178
186
  ommlds/minichain/backends/impls/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
187
  ommlds/minichain/backends/impls/google/chat.py,sha256=q6LasmAh3Xn78kNlgpgwoKhdTj3o76j0X3_xitdyAE0,6316
180
188
  ommlds/minichain/backends/impls/google/names.py,sha256=HxHJ31HeKZg6aW1C_Anqp-gamCXpq9pOdKj8_yVgE8Y,871
181
189
  ommlds/minichain/backends/impls/google/search.py,sha256=5-2nAZ1QmbqHSQcwWnqqcgCM-Duy2ryctJEIv2tcpZg,3260
182
- ommlds/minichain/backends/impls/google/stream.py,sha256=Mhg5cOe7PKbnlQURyk2IRermtpzxU5Y0j3w4fkt2ZRg,7900
190
+ ommlds/minichain/backends/impls/google/stream.py,sha256=8k-8OfX4EuGtRewKx7VFLVeH3YAuF5t6EWVSoH8-VPU,7803
183
191
  ommlds/minichain/backends/impls/google/tools.py,sha256=Tty0gsyx7-PbeoNqMuql_ewQ6q-ZsDaDdsD5ShinGVY,5089
184
192
  ommlds/minichain/backends/impls/huggingface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
185
193
  ommlds/minichain/backends/impls/huggingface/configs.py,sha256=6jsBtPNXOP57PcpxNTVLGWLc-18Iwn_lDbGouwCJTIQ,258
186
194
  ommlds/minichain/backends/impls/huggingface/repos.py,sha256=8BDxJmra9elSQL2vzp2nr2p4Hpq56A3zTk7hTTnfJU4,861
187
195
  ommlds/minichain/backends/impls/llamacpp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
- ommlds/minichain/backends/impls/llamacpp/chat.py,sha256=YeBzlA_3gcuF6KF0HIE7abUp28_o1Kil-SujyQNAHyE,5508
196
+ ommlds/minichain/backends/impls/llamacpp/chat.py,sha256=J6Jslx9atAtWvLdrVtvRboQUBzRX7Z5aHlo0dK5X78A,5649
189
197
  ommlds/minichain/backends/impls/llamacpp/completion.py,sha256=oJ2I6wUoIPXYLm9Vc7dwOPgqbevatTjNBZ-jXeM24tQ,2372
190
198
  ommlds/minichain/backends/impls/llamacpp/format.py,sha256=fcLMwk7r7FbNrYCH39G3fDRInKvlPIqcoxyLj95CooA,778
191
- ommlds/minichain/backends/impls/llamacpp/stream.py,sha256=uGog3xPNqCjGgyZjXEjhlxKbIbakWbapjANAEsmW-U4,3378
199
+ ommlds/minichain/backends/impls/llamacpp/stream.py,sha256=uzrXr2HhshgFe3Z0g8KTPc6Dr2kPsyxZabIy2d6IOBg,3547
192
200
  ommlds/minichain/backends/impls/mlx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
193
201
  ommlds/minichain/backends/impls/mlx/chat.py,sha256=sMlhgiFZrxAC-kKkLSJ6c-2uJn0IHZXH4EiPET_-CKI,7458
202
+ ommlds/minichain/backends/impls/ollama/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
203
+ ommlds/minichain/backends/impls/ollama/chat.py,sha256=l9agVFvVmB0j8SaE62Yx2ItiR55HOVnKDrFPTXltP9E,6590
194
204
  ommlds/minichain/backends/impls/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
195
205
  ommlds/minichain/backends/impls/openai/chat.py,sha256=eMRjxPNrzrRjaw83LJuYzP9DGvwGyY2ObJSZub4Z9bY,2658
196
206
  ommlds/minichain/backends/impls/openai/completion.py,sha256=0XTC08mZzbW23Y2DNW2xfRR0eDX4nTyejF8CR1BdHZs,1756
197
207
  ommlds/minichain/backends/impls/openai/embedding.py,sha256=kkDJ3_0EqwQ_E0eXsSH1TuWXQmRqaijK8zG90fnlf3s,1582
198
208
  ommlds/minichain/backends/impls/openai/format.py,sha256=teGX8mNU3sXNWP4YWGD8d59M4X9_r75ImSzfTJgtNCM,7351
199
209
  ommlds/minichain/backends/impls/openai/names.py,sha256=b74t8FwSbGEveVtVz4SqM5tiRDyTKNlUKlseV6AX3Yo,1211
200
- ommlds/minichain/backends/impls/openai/stream.py,sha256=M7II7kZFsy33j8NQwdM1CCeKet3lw-XLOQdDzrzn-Yo,5297
210
+ ommlds/minichain/backends/impls/openai/stream.py,sha256=AkALgjkALmWd3FaeXdLlPilI8JiW4lpJdknISt0gS-4,5200
201
211
  ommlds/minichain/backends/impls/sentencepiece/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
212
  ommlds/minichain/backends/impls/sentencepiece/tokens.py,sha256=tUEBKyBgkTowssS_AdcAuPkyFzfyDfE935x4JG8PXM0,1602
203
213
  ommlds/minichain/backends/impls/tinygrad/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -207,7 +217,7 @@ ommlds/minichain/backends/impls/tokenizers/tokens.py,sha256=_8Q49k5YroG5wQI0cuK6
207
217
  ommlds/minichain/backends/impls/transformers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
208
218
  ommlds/minichain/backends/impls/transformers/sentence.py,sha256=1bFJ-ND3MOkj7mNsPuISrQCpqTs7npmmNmYcc2go-Fk,1393
209
219
  ommlds/minichain/backends/impls/transformers/tokens.py,sha256=uS3-IWOJRUMBfPDVRrp3SCaXdE1yzEdKHQcyv0JZQIw,2089
210
- ommlds/minichain/backends/impls/transformers/transformers.py,sha256=Bb1RnvDlo8bzu24ByhDacDC0sN7R7KYZnPZ9hjbViBg,5287
220
+ ommlds/minichain/backends/impls/transformers/transformers.py,sha256=laM8G2SAE6jUjnHkeZsbWxS2KJF4efi-35aBlRBzIsE,9053
211
221
  ommlds/minichain/backends/strings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
212
222
  ommlds/minichain/backends/strings/manifests.py,sha256=kmlanVUAZqIh0P95Mm8H20e8ib3gEgYHHUlkCXDQGFk,413
213
223
  ommlds/minichain/backends/strings/parsing.py,sha256=2wChk9Z8fhqJTk8_91f8QFjKcSZygOQM_rVk-P4NnKw,1772
@@ -296,7 +306,7 @@ ommlds/minichain/models/names.py,sha256=SqXrOkSFTI2VkfA5puGGb0EFg2TvvNZpJgTF7eS6
296
306
  ommlds/minichain/models/repos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
297
307
  ommlds/minichain/models/repos/resolving.py,sha256=I8l8osTJNE0mT5nmb7tYhOfNH0f-F3JQVkvIrjLPvOE,602
298
308
  ommlds/minichain/registries/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
299
- ommlds/minichain/registries/globals.py,sha256=oibPBjAO1MMemcaV6NdOLGenjB820sBvdLoL4je5CJU,2973
309
+ ommlds/minichain/registries/globals.py,sha256=M4-RTsjHfm7FRXqV-4ecWywEF1Di2lnTn3a7OJhtzkU,3224
300
310
  ommlds/minichain/registries/manifests.py,sha256=GTWk4lssAk8mmG3ilGK2NvIU-rGS3otOZNuGQUDStMI,362
301
311
  ommlds/minichain/registries/registry.py,sha256=wmk88NsM20Kl4PduX3Oy5roHPfNKtXENCITTc7M8gAY,4626
302
312
  ommlds/minichain/services/__init__.py,sha256=gjhYyT7-MY1PISdHMKmfk2o_QrdU7UV7I9ZNh2Yjpu4,336
@@ -367,9 +377,9 @@ ommlds/wiki/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
367
377
  ommlds/wiki/utils/io.py,sha256=UKgDJGtmpnWvIqVd2mJc2QNPOqlToEY1GEveNp6_pMo,7088
368
378
  ommlds/wiki/utils/progress.py,sha256=EhvKcMFYtsarCQhIahlO6f0SboyAKP3UwUyrnVnP-Vk,3222
369
379
  ommlds/wiki/utils/xml.py,sha256=vVV8Ctn13aaRM9eYfs9Wd6rHn5WOCEUzQ44fIhOvJdg,3754
370
- ommlds-0.0.0.dev467.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
371
- ommlds-0.0.0.dev467.dist-info/METADATA,sha256=NvYqf0PtfEdrj2en5RFFpTHB_cGjm41groVHgy54WZQ,3224
372
- ommlds-0.0.0.dev467.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
373
- ommlds-0.0.0.dev467.dist-info/entry_points.txt,sha256=Z5YWtX7ClfiCKdW-dd_CSVvM0h4yQpJPi-2G3q6gNFo,35
374
- ommlds-0.0.0.dev467.dist-info/top_level.txt,sha256=Rbnk5d5wi58vnAXx13WFZqdQ4VX8hBCS2hEL3WeXOhY,7
375
- ommlds-0.0.0.dev467.dist-info/RECORD,,
380
+ ommlds-0.0.0.dev469.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
381
+ ommlds-0.0.0.dev469.dist-info/METADATA,sha256=DpB16y8YfJ2LGRK-RKtvFKjVZq0GVA4U1dd_eu2rUP4,3224
382
+ ommlds-0.0.0.dev469.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
383
+ ommlds-0.0.0.dev469.dist-info/entry_points.txt,sha256=Z5YWtX7ClfiCKdW-dd_CSVvM0h4yQpJPi-2G3q6gNFo,35
384
+ ommlds-0.0.0.dev469.dist-info/top_level.txt,sha256=Rbnk5d5wi58vnAXx13WFZqdQ4VX8hBCS2hEL3WeXOhY,7
385
+ ommlds-0.0.0.dev469.dist-info/RECORD,,