@melaya/runner 1.0.46 → 1.0.47

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.
@@ -206,6 +206,25 @@ async def _ingest(args) -> int:
206
206
  from agentscope.rag import QdrantStore, SimpleKnowledge
207
207
  store_path = _resolve_store_path(args.pipeline_name)
208
208
  store_path.mkdir(parents=True, exist_ok=True)
209
+ # ── Fix qdrant-client's location-vs-path ambiguity ───────────────
210
+ # agentscope's QdrantStore only exposes `location=` and forwards
211
+ # it verbatim to `AsyncQdrantClient(location=...)`. When `location`
212
+ # is a filesystem path (not `:memory:` and not a URL), qdrant-client
213
+ # tries to parse it as a host:port → getaddrinfo → fails with
214
+ # `[Errno 8] nodename nor servname provided` on Mac / `[Errno
215
+ # 11001] getaddrinfo failed` on Windows. Per-file embedding then
216
+ # crashes 240 times in a row. Reroute `location=<path>` into the
217
+ # dedicated `path=` kwarg the embedded-mode wants.
218
+ import qdrant_client as _qc
219
+ _orig_qcinit = _qc.AsyncQdrantClient.__init__
220
+ def _patched_qcinit(self, location=None, **_kw):
221
+ if (location and location != ":memory:"
222
+ and "://" not in str(location)
223
+ and not _kw.get("path")):
224
+ _kw["path"] = location
225
+ location = None
226
+ _orig_qcinit(self, location=location, **_kw)
227
+ _qc.AsyncQdrantClient.__init__ = _patched_qcinit
209
228
  store = QdrantStore(
210
229
  location=str(store_path),
211
230
  collection_name=args.pipeline_name,
package/localRagIngest.py CHANGED
@@ -206,6 +206,25 @@ async def _ingest(args) -> int:
206
206
  from agentscope.rag import QdrantStore, SimpleKnowledge
207
207
  store_path = _resolve_store_path(args.pipeline_name)
208
208
  store_path.mkdir(parents=True, exist_ok=True)
209
+ # ── Fix qdrant-client's location-vs-path ambiguity ───────────────
210
+ # agentscope's QdrantStore only exposes `location=` and forwards
211
+ # it verbatim to `AsyncQdrantClient(location=...)`. When `location`
212
+ # is a filesystem path (not `:memory:` and not a URL), qdrant-client
213
+ # tries to parse it as a host:port → getaddrinfo → fails with
214
+ # `[Errno 8] nodename nor servname provided` on Mac / `[Errno
215
+ # 11001] getaddrinfo failed` on Windows. Per-file embedding then
216
+ # crashes 240 times in a row. Reroute `location=<path>` into the
217
+ # dedicated `path=` kwarg the embedded-mode wants.
218
+ import qdrant_client as _qc
219
+ _orig_qcinit = _qc.AsyncQdrantClient.__init__
220
+ def _patched_qcinit(self, location=None, **_kw):
221
+ if (location and location != ":memory:"
222
+ and "://" not in str(location)
223
+ and not _kw.get("path")):
224
+ _kw["path"] = location
225
+ location = None
226
+ _orig_qcinit(self, location=location, **_kw)
227
+ _qc.AsyncQdrantClient.__init__ = _patched_qcinit
209
228
  store = QdrantStore(
210
229
  location=str(store_path),
211
230
  collection_name=args.pipeline_name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,