Skip to main content
Glama
factory.ts824 B
import { join } from "node:path"; import type { VectorConfig } from "@/types"; import type { VectorStore } from "./interface"; import { QdrantVectorStore } from "./qdrant"; import { SqliteVecStore } from "./sqlite-vec"; /** * Create a vector store based on configuration. * Auto-selects between Qdrant (Docker) and sqlite-vec (embedded). */ export function createVectorStore( config: VectorConfig, projectPath: string, ): VectorStore { if (config.provider === "qdrant") { return new QdrantVectorStore({ url: config.url, apiKey: config.apiKey, collectionName: config.collectionName, }); } // Default to sqlite-vec (embedded) const dbPath = join(projectPath, config.dbPath ?? ".doclea/vectors.db"); return new SqliteVecStore({ dbPath, vectorSize: config.vectorSize, }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/docleaai/doclea-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server