Whatever message this page gives is out now! Go check it out!
DocumentService()DocumentService() takes no arguments. All configuration is passed per-operation on the returned object.load(), loadAsync(), lazyLoad(), split(), transform(), transformSegments(), ingest(), and registerCustomParser().docService = DocumentService();
documents = docService.load({
path: "./company-docs/",
recursive: true,
pattern: "*.{pdf,docx,txt,md}"
});
segments = docService.split(documents, {
splitterType: "recursive",
chunkSize: 1000,
chunkOverlap: 100
});
vectorStore = VectorStore({ provider: "inmemory" });
result = docService.ingest(segments, vectorStore, { batchSize: 50 });
writeOutput("Ingested: #result.successfulSegments# / #result.totalSegments#");