init() Compatibility
v0.1 init() API remains supported as a shim.
Usage
const ctx = new Wolbarg();
await ctx.init({
organization: "my-org",
database: {
provider: "sqlite", // or "postgres"
connectionString: "./memory.db",
},
embedding: {
baseUrl: "https://api.openai.com/v1",
apiKey: process.env.OPENAI_API_KEY!,
model: "text-embedding-3-small",
},
llm: { // optional in 0.2
baseUrl: "https://api.openai.com/v1",
apiKey: process.env.OPENAI_API_KEY!,
model: "gpt-4.1-mini",
},
});Notes
Prefer constructor DI + factories for new code. init maps database → storage and wires embedding / optional llm the same way.