@ontos-ai/knowhere-sdk 2.1.1 → 2.1.2
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.
- package/README.md +7 -7
- package/dist/index.d.mts +219 -318
- package/dist/index.d.ts +219 -318
- package/dist/index.js +700 -730
- package/dist/index.mjs +700 -730
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ helpers still write under the SDK cache directory by design, while published
|
|
|
352
352
|
Knowhere's remote chunk API without importing the result ZIP into local disk.
|
|
353
353
|
Server workflows can configure parsed storage with
|
|
354
354
|
`client.knowledge.withParsedStorage(...)` so Notebook, MCP, and CLI surfaces
|
|
355
|
-
share the same
|
|
355
|
+
share the same committed result-layout model.
|
|
356
356
|
|
|
357
357
|
```typescript
|
|
358
358
|
const parsed = await client.knowledge.parseToLocalCache({
|
|
@@ -391,9 +391,10 @@ or stale. Search uses the Knowhere API retrieval query; local document IDs only
|
|
|
391
391
|
help map returned server document IDs back to local cache IDs when available.
|
|
392
392
|
When `knowledge.parseToLocalCache(...)`, `knowledge.importJobResult(...)`, or
|
|
393
393
|
`knowledge.loadJobResult(...)` runs with configured parsed storage, the SDK
|
|
394
|
-
writes
|
|
395
|
-
|
|
396
|
-
the
|
|
394
|
+
writes the expanded Knowhere result layout (`manifest.json`, `chunks.json`,
|
|
395
|
+
sidecars, and assets), sync progress, and a final `.knowhere-sdk/commit.json`
|
|
396
|
+
before returning. Partial storage writes are ignored until the commit marker is
|
|
397
|
+
present.
|
|
397
398
|
|
|
398
399
|
```typescript
|
|
399
400
|
const knowledge = client.knowledge.withParsedStorage({
|
|
@@ -405,8 +406,8 @@ const knowledge = client.knowledge.withParsedStorage({
|
|
|
405
406
|
|
|
406
407
|
If a search result only has a published `documentId`, read-oriented helpers can
|
|
407
408
|
accept that remote identifier directly. `readChunks` supports display paging;
|
|
408
|
-
|
|
409
|
-
|
|
409
|
+
remote fallback requests asset URLs from the Knowhere API, and storage hits use
|
|
410
|
+
stored object URLs when the configured storage can resolve them:
|
|
410
411
|
|
|
411
412
|
```typescript
|
|
412
413
|
const remoteRead = await knowledge.readChunks({
|
|
@@ -414,7 +415,6 @@ const remoteRead = await knowledge.readChunks({
|
|
|
414
415
|
page: 1,
|
|
415
416
|
pageSize: 20,
|
|
416
417
|
chunkType: 'page',
|
|
417
|
-
assetUrlPolicy: 'durable',
|
|
418
418
|
});
|
|
419
419
|
|
|
420
420
|
const remoteOutline = await knowledge.getDocumentOutline({
|