UNPKG

@restnfeel/agentc-starter-kit

Version:

한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템

29 lines (26 loc) 920 B
import { BaseDocumentLoader } from './base.js'; import { l as libExports } from '../../_virtual/index2.js'; class DocxDocumentLoader extends BaseDocumentLoader { constructor() { super(...arguments); this.supportedExtensions = ["docx", "doc"]; } async load(filePath, content) { try { const result = await libExports.extractRawText({ buffer: content }); const cleanedText = this.cleanText(result.value); const metadata = this.createBaseMetadata(filePath, content.length); return { id: this.generateDocumentId(filePath), content: cleanedText, metadata, source: filePath, }; } catch (error) { throw new Error(`Failed to load DOCX document: ${error}`); } } } export { DocxDocumentLoader }; //# sourceMappingURL=docx.js.map