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.

15 lines (11 loc) 425 B
import { clientDB, initializeDB } from '@/database/client/db'; import { LobeChatDatabase } from '@/database/type'; const isServerDBMode = process.env.TEST_SERVER_DB === '1'; export const getTestDB = async () => { if (isServerDBMode) { const { getTestDBInstance } = await import('@/database/core/dbForTest'); return await getTestDBInstance(); } await initializeDB(); return clientDB as LobeChatDatabase; };