File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 1- // import { UnstructuredLoader } from 'langchain/document_loaders/fs/unstructured';
21import { OpenAIEmbeddings } from 'langchain/embeddings/openai' ;
32import { MarkdownTextSplitter } from 'langchain/text_splitter' ;
43import { HNSWLib } from 'langchain/vectorstores/hnswlib' ;
@@ -43,18 +42,6 @@ console.log('Getting documents');
4342const documents : Document [ ] = [ ] ;
4443
4544for ( const { path, url } of paths ) {
46- // const loader = new UnstructuredLoader(path, {
47- // // Switch to this if you are getting ratelimits, needs unstructured running locally
48- // // https://js.langchain.com/docs/modules/indexes/document_loaders/examples/file_loaders/unstructured#setup
49- // apiUrl: 'http://127.0.0.1:8000/general/v0/general',
50- // });
51-
52- // const docs = await loader.loadAndSplit(new MarkdownTextSplitter());
53-
54- // for (const doc of docs) {
55- // doc.metadata.source = url;
56- // }
57-
5845 const content = await readFile ( path , 'utf-8' ) ;
5946 const splitter = new MarkdownTextSplitter ( ) ;
6047
You can’t perform that action at this time.
0 commit comments