| | |
| | | // ContentRetriever contentRetrieverXiaozhi() { |
| | | // //使用FileSystemDocumentLoader读取指定目录下的知识库文档 |
| | | // //并使用默认的文档解析器对文档进行解析 |
| | | //// Document document1 = FileSystemDocumentLoader.loadDocument(one); |
| | | // Document document1 = FileSystemDocumentLoader.loadDocument(one); |
| | | //// Document document2 = FileSystemDocumentLoader.loadDocument(two); |
| | | //// Document document3 = FileSystemDocumentLoader.loadDocument(three); |
| | | //// List<Document> documents = Arrays.asList(document1, document2, document3); |
| | | // |
| | | //// List<Document> documents = Collections.singletonList(document1); |
| | | // List<Document> documents = Collections.singletonList(document1); |
| | | //// 2. 将数据库数据转为LangChain4j的Document对象 |
| | | //// List<Document> documents = new ArrayList<>(); |
| | | // |