@losi-ai/gemini
v0.1.0
Published
Google Gemini adapter for Losi Context Bank. Give Gemini persistent business context and switch models without losing it.
Maintainers
Readme
@losi-ai/gemini
Google Gemini adapter for Losi Context Bank. Give Gemini persistent business context, then switch models without losing it.
npm install @losi-ai/core @losi-ai/gemini @google/generative-aiExample
import { LosiContext } from "@losi-ai/core";
import { GeminiAdapter } from "@losi-ai/gemini";
const ctx = new LosiContext({
adapter: new GeminiAdapter({ apiKey: process.env.GEMINI_API_KEY! }),
});
const res = await ctx.complete("What should I prioritize this week?");
console.log(res.content);- Default model:
gemini-3.8-flash - Supports content generation and streaming (
ctx.stream(...)) - API key from
apiKeyoption or theGEMINI_API_KEYenv var - System messages are mapped to Gemini's
systemInstruction
MIT licensed.
