UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

20 lines (18 loc) 667 B
import { FileLoaderInterface, SupportedFileType } from '../types'; import { DocxLoader } from './docx'; // import { EpubLoader } from './epub'; import { ExcelLoader } from './excel'; import { PdfLoader } from './pdf'; import { PptxLoader } from './pptx'; import { TextLoader } from './text'; // Loader configuration map // Key: file extension (lowercase, without leading dot) or specific type name // Value: Loader Class implementing FileLoaderInterface export const fileLoaders: Record<SupportedFileType, new () => FileLoaderInterface> = { docx: DocxLoader, // epub: EpubLoader, excel: ExcelLoader, pdf: PdfLoader, pptx: PptxLoader, txt: TextLoader, };