You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

db-vector

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db-vector

Client adapters for vector databases with utilities

0.5.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

DB-VECTOR

Unified client for cloud vector databases with chunking and update functionality.

Features

  • 🔌 Clients for Different Vector Search (Pinecone || MongoDB for now)
  • ✂️ Advanced chunking functionality (wip)
  • 🔄 Automatic vector database updates (wip)
  • 📦 Simple and unified API (wip)
  • 🚀 TypeScript support

Installation

npm install db-vector

Basic Usage

import { createClient, loadFolder } from 'db-vector';

// Create Client

const client = createClient({
  provider: 'pinecone',
  apiKey: 'API_KEY',
  config: {
    // provider-specific configuration
  }
});

const client = createClient({
  provider: 'mongodb',
  connectionString: 'CONNECTION_STRING',
  config: {
    // provider-specific configuration
  }
});

// Load docs from folder
const docs = await loadFolder('/documents')

// process and upsert documents

  await processDocument(client, indexname, namespace, doc, {
    batchSize: batchsize,
    onProgress: progressCallback
  })

Project Structure

db-vector/
├── src/
│   ├── clients/          # Clients for various providers
│   ├── lib/              # utils
│   ├── chunking/         # Chunking functionality
│   ├── types/           # TypeScript definitions
│   └── index.ts         # Main entry point
├── dist/                # Build output
├── tests/               # Test suite
└── docs/                # Documentation

License

MIT

Contributing

Contributions are welcome! Open an issue or pull request.

Keywords

vector

FAQs

Package last updated on 19 Jul 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.