Whatever message this page gives is out now! Go check it out!
DocumentService().docService.ingest( segments, vectorStoreClient [, options] )Parameter | Type | Required | Description |
|---|---|---|---|
segments | Array | Required | Array of text segment Structs to embed and store, as returned by split() or transformSegments(). |
vectorStoreClient | VectorStore | Required | A VectorStore() instance to receive the embedded segments. |
options | Struct | Optional | Keys: batchSize (Numeric, default 100, range 1–1000) — number of segments embedded per batch; continueOnError (Boolean, default true) — when true, skips failed segments and continues processing. |
Key | Description |
|---|---|
totalSegments | Total segments passed in. |
successfulSegments | Segments successfully embedded and stored. |
failedSegments | Segments that could not be embedded or stored. |
durationMs | Total ingestion time in milliseconds. |
status | String status of the operation. |
result = docService.ingest(segments, vectorStore, { batchSize: 50 });
writeOutput("Success: #result.successfulSegments# / #result.totalSegments#");