Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@ragpipe/plugin-voyage

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ragpipe/plugin-voyage

Voyage AI embedding plugin for ragpipe

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
9
50%
Maintainers
1
Weekly downloads
 
Created
Source

@ragpipe/plugin-voyage

Voyage AI embedding plugin for ragpipe.

This package provides the embedding axis only. Pair it with any ragpipe vector store and generation plugin.

Install

pnpm add ragpipe @ragpipe/plugin-voyage

Usage

import { defineConfig } from "ragpipe";
import { voyageEmbedding } from "@ragpipe/plugin-voyage";

export default defineConfig({
  embedding: voyageEmbedding({
    apiKey: process.env.VOYAGE_API_KEY!,
    model: "voyage-4-lite",
    dimensions: 1024,
    inputType: "document",
  }),
  // vectorStore, generation ...
});

API

voyageEmbedding(options)

Returns an EmbeddingPlugin that calls the Voyage embeddings API.

OptionTypeDefaultDescription
apiKeystringVoyage API key (required)
modelstringEmbedding model name (required)
dimensionsnumberOutput dimension (required)
baseUrlstring"https://api.voyageai.com/v1"API base URL
inputType"query" | "document"Retrieval-oriented input type hint
  • Rate limit: 200ms between calls
  • Batch support: embedMany() sends an array input in one API call
  • Ordering: responses are sorted by index before returning

Supported Models

Common Voyage embedding model/dimension pairs:

ModelDimensions
voyage-4-large1024
voyage-41024
voyage-4-lite1024
voyage-4-nano1024
voyage-3-large1024
voyage-3.51024
voyage-3.5-lite1024
voyage-code-31024
voyage-code-21536
voyage-finance-21024
voyage-law-21024
voyage-large-2-instruct1024
voyage-multilingual-21024

Notes

  • Uses native fetch; no Voyage SDK dependency is required.
  • Sends output_dimension on every request because dimensions is required.
  • Sends input_type only when inputType is explicitly configured.
  • Throws explicit errors for HTTP failures, malformed payloads, and empty embedding responses.

Get an API Key

  • Sign in to Voyage AI
  • Create an API key
  • Set VOYAGE_API_KEY in your environment

License

MIT

Keywords

ragpipe

FAQs

Package last updated on 12 Apr 2026

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