@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.
21 lines (16 loc) • 548 B
text/typescript
import { isDesktop } from '@/const/version';
import { DesktopLocalFileImpl } from './local';
import { S3StaticFileImpl } from './s3';
import { FileServiceImpl } from './type';
/**
* 创建文件服务模块
* 根据环境自动选择使用S3或桌面本地文件实现
*/
export const createFileServiceModule = (): FileServiceImpl => {
// 如果在桌面应用环境,使用本地文件实现
if (isDesktop) {
return new DesktopLocalFileImpl();
}
return new S3StaticFileImpl();
};
export type { FileServiceImpl } from './type';