
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@khaveeai/providers-pgvector
Advanced tools
PostgreSQL + pgvector provider for the Khavee AI SDK. Bring your own Postgres database and get document storage, CSV import, and vector similarity search out of the box.
npm install @khaveeai/providers-pgvector
# requires: pg, openai (peer)
import { PgVectorProvider } from "@khaveeai/providers-pgvector";
const db = new PgVectorProvider({
connectionString: process.env.DATABASE_URL!,
openaiApiKey: process.env.OPENAI_API_KEY!,
});
// 1. Create schema on first run
await db.migrate();
// 2. Insert a document
await db.insertDocument("Hello my name is Non", { category: "greeting" });
// 3. Import a CSV
await db.importCSV(csvString); // must have a "content" column
// 4. Vector search
const results = await db.search("what is your name?", 5, 0.3);
// → [{ id, content, metadata, createdAt, similarity }]
// 5. Browse all
const docs = await db.listDocuments(20);
The CSV must have a content column (or set contentColumn in options).
All other columns become metadata.
content,category,author
"Hello my name is Non",greeting,Non
"The Eiffel Tower is in Paris",geography,system
await db.importCSV(csvString, { contentColumn: "content", concurrency: 5 });
| Option | Type | Default | Description |
|---|---|---|---|
connectionString | string | required | PostgreSQL connection URL |
openaiApiKey | string | required | OpenAI key for embeddings |
embeddingModel | string | text-embedding-3-small | Any OpenAI embedding model |
embeddingDimensions | number | 1536 | Must match the model |
tableName | string | documents | Table to read/write |
defaultTopK | number | 5 | Default search results |
defaultThreshold | number | 0.3 | Default min similarity |
defaultConcurrency | number | 5 | Parallel embed calls |
import { OpenAIRealtimeProvider } from "@khaveeai/providers-openai-realtime";
import { PgVectorProvider } from "@khaveeai/providers-pgvector";
const vectorDB = new PgVectorProvider({ connectionString, openaiApiKey });
const provider = new OpenAIRealtimeProvider({
useProxy: true,
rag: {
provider: vectorDB,
topK: 5,
threshold: 0.3,
systemPromptPrefix: "Use the following context to answer questions:",
},
});
FAQs
PostgreSQL + pgvector provider for Khavee AI SDK
We found that @khaveeai/providers-pgvector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.