WOLBΛRG

Example — PostgreSQL

Shared PostgreSQL storage with the pg peer dependency.

npm install pg
import { Wolbarg, postgres, openaiEmbedding } from "wolbarg";

const ctx = new Wolbarg({
  organization: "prod",
  storage: postgres({
    connectionString: process.env.DATABASE_URL!,
    maxPoolSize: 10,
  }),
  embedding: openaiEmbedding({
    apiKey: process.env.OPENAI_API_KEY!,
    model: "text-embedding-3-small",
  }),
});

await ctx.ready();

On this page