
Research
Shai-Hulud Descends to Hades: Miasma Worm Campaign Spreads with New PyPI Wave
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.
@ragpipe/plugin-openai
Advanced tools
OpenAI embedding and generation plugin for ragpipe.
pnpm add ragpipe @ragpipe/plugin-openai
import { defineConfig } from "ragpipe";
import { openaiEmbedding, openaiGeneration } from "@ragpipe/plugin-openai";
export default defineConfig({
embedding: openaiEmbedding({
apiKey: process.env.OPENAI_API_KEY ?? "",
model: "text-embedding-3-small",
}),
generation: openaiGeneration({
apiKey: process.env.OPENAI_API_KEY ?? "",
model: "gpt-4o-mini",
systemPrompt: "Answer based on the provided context.",
}),
// ... vectorStore
});
openaiEmbedding(options)Returns an EmbeddingPlugin that calls the OpenAI Embeddings API.
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | OpenAI API key (required) |
model | string | "text-embedding-3-small" | Embedding model name |
dimensions | number | model default (1536 / 3072) | Output dimensions (text-embedding-3-* only) |
baseUrl | string | "https://api.openai.com/v1" | API base URL |
embedMany() sends array input in a single API calltext-embedding-3-small/large support custom dimensions to reduce output sizebaseUrl to use OpenRouter, Azure OpenAI, or other OpenAI-compatible endpointsopenaiGeneration(options)Returns a GenerationPlugin that calls the OpenAI Chat Completions API.
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | OpenAI API key (required) |
model | string | "gpt-4o-mini" | Chat model name |
systemPrompt | string | "Answer based on the provided context." | Default system instruction |
baseUrl | string | "https://api.openai.com/v1" | API base URL |
generateStream() returns an AsyncIterable<string> via SSE{ history } to include conversation context{ systemPrompt } at call time to override the defaultbaseUrl to use OpenRouter, Azure OpenAI, or other OpenAI-compatible endpoints| Model | Dimensions | Notes |
|---|---|---|
text-embedding-3-small | 1536 | Default, cost-efficient |
text-embedding-3-large | 3072 | High precision |
text-embedding-ada-002 | 1536 | Legacy |
| Model | Notes |
|---|---|
gpt-4o-mini | Default, cost-efficient |
gpt-4o | Flagship |
o1 | Reasoning |
o3-mini | Reasoning (lightweight) |
OPENAI_API_KEY in your environmentMIT
FAQs
OpenAI embedding and generation plugin for ragpipe
The npm package @ragpipe/plugin-openai receives a total of 11 weekly downloads. As such, @ragpipe/plugin-openai popularity was classified as not popular.
We found that @ragpipe/plugin-openai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.