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.

26 lines (22 loc) 631 B
import { worker } from '@electric-sql/pglite/worker'; import { InitMeta } from './type'; worker({ async init(options) { const { wasmModule, fsBundle, vectorBundlePath, dbName } = options.meta as InitMeta; const { PGlite } = await import('@electric-sql/pglite'); return new PGlite({ dataDir: `idb://${dbName}`, extensions: { vector: { name: 'pgvector', setup: async (pglite, options) => { return { bundlePath: new URL(vectorBundlePath), options }; }, }, }, fsBundle, relaxedDurability: true, wasmModule, }); }, });