@melaya/runner 1.0.38 → 1.0.40

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.
@@ -113,6 +113,15 @@ async def _ingest(args) -> int:
113
113
  dimensions=768,
114
114
  )
115
115
  embedder.client.base_url = "http://localhost:1234/v1"
116
+ # LM Studio's /v1/embeddings rejects the OpenAI-specific
117
+ # `dimensions` kwarg (only OpenAI text-embedding-3 supports
118
+ # output-dim reduction). Strip it before each call so the
119
+ # request is shaped exactly as LMS expects.
120
+ _orig_create = embedder.client.embeddings.create
121
+ async def _lms_create(**kw):
122
+ kw.pop("dimensions", None)
123
+ return await _orig_create(**kw)
124
+ embedder.client.embeddings.create = _lms_create # type: ignore[assignment]
116
125
  else:
117
126
  _emit("error", reason=(
118
127
  f"refused embedder provider '{args.embedder_provider}' for Mode B "
@@ -173,6 +182,10 @@ async def _ingest(args) -> int:
173
182
  ext = f.suffix.lower()
174
183
  if ext not in SUPPORTED_EXTS:
175
184
  continue
185
+ # macOS AppleDouble resource forks (._foo.docx, ._.DS_Store, …) —
186
+ # they're not real documents and every extractor will choke on them.
187
+ if f.name.startswith("._") or f.name == ".DS_Store":
188
+ continue
176
189
  try:
177
190
  raw = f.read_bytes()
178
191
  except Exception as exc:
package/dist/pythonEnv.js CHANGED
@@ -108,6 +108,17 @@ const PIP_DEPS = [
108
108
  // ships Windows wheels, MilvusLite does not — using Qdrant for OS
109
109
  // parity across runners.)
110
110
  "ollama",
111
+ // nltk — used by agentscope.rag readers' default split_by="sentence"
112
+ // chunker. Without it, every reader raises ImportError at chunk time
113
+ // (the lazy import happens INSIDE the chunking call, not at module load,
114
+ // so the error surfaces per-file as "nltk is not installed"). The
115
+ // readers also lazily `nltk.download("punkt", quiet=True)` on first use.
116
+ "nltk",
117
+ // pandas — agentscope.rag.ExcelReader uses pandas.read_excel for sheet
118
+ // iteration. Without it, .xlsx files in a Mode B folder fail with
119
+ // "pandas is not installed". Numpy is already in PIP_DEPS (line 57) so
120
+ // the wheel install is fast.
121
+ "pandas",
111
122
  ];
112
123
  export function venvPython() {
113
124
  return platform() === "win32"
package/localRagIngest.py CHANGED
@@ -113,6 +113,15 @@ async def _ingest(args) -> int:
113
113
  dimensions=768,
114
114
  )
115
115
  embedder.client.base_url = "http://localhost:1234/v1"
116
+ # LM Studio's /v1/embeddings rejects the OpenAI-specific
117
+ # `dimensions` kwarg (only OpenAI text-embedding-3 supports
118
+ # output-dim reduction). Strip it before each call so the
119
+ # request is shaped exactly as LMS expects.
120
+ _orig_create = embedder.client.embeddings.create
121
+ async def _lms_create(**kw):
122
+ kw.pop("dimensions", None)
123
+ return await _orig_create(**kw)
124
+ embedder.client.embeddings.create = _lms_create # type: ignore[assignment]
116
125
  else:
117
126
  _emit("error", reason=(
118
127
  f"refused embedder provider '{args.embedder_provider}' for Mode B "
@@ -173,6 +182,10 @@ async def _ingest(args) -> int:
173
182
  ext = f.suffix.lower()
174
183
  if ext not in SUPPORTED_EXTS:
175
184
  continue
185
+ # macOS AppleDouble resource forks (._foo.docx, ._.DS_Store, …) —
186
+ # they're not real documents and every extractor will choke on them.
187
+ if f.name.startswith("._") or f.name == ".DS_Store":
188
+ continue
176
189
  try:
177
190
  raw = f.read_bytes()
178
191
  except Exception as exc:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,