@losi-ai/openai
v0.1.0
Published
OpenAI adapter for Losi Context Bank. Give GPT persistent business context and switch to any other model without losing it.
Maintainers
Readme
@losi-ai/openai
OpenAI (GPT) adapter for Losi Context Bank. Give GPT persistent business context, then switch to any other model without losing it.
npm install @losi-ai/core @losi-ai/openai openaiExample
import { LosiContext } from "@losi-ai/core";
import { OpenAIAdapter } from "@losi-ai/openai";
const ctx = new LosiContext({
adapter: new OpenAIAdapter({ apiKey: process.env.OPENAI_API_KEY!, model: "gpt-5.6-sol" }),
});
const res = await ctx.complete("Draft a follow-up email to my last lead.");
console.log(res.content);- Default model:
gpt-5.6-sol - Supports chat completions, function/tool calling, and streaming (
ctx.stream(...)) - API key from
apiKeyoption or theOPENAI_API_KEYenv var
MIT licensed.
