@losi-ai/cohere
v0.1.0
Published
Cohere adapter for Losi Context Bank. Give Cohere persistent business context and switch models without losing it.
Maintainers
Readme
@losi-ai/cohere
Cohere adapter for Losi Context Bank. Give Cohere persistent business context, then switch models without losing it.
npm install @losi-ai/core @losi-ai/cohere cohere-aiExample
import { LosiContext } from "@losi-ai/core";
import { CohereAdapter } from "@losi-ai/cohere";
const ctx = new LosiContext({
adapter: new CohereAdapter({ apiKey: process.env.COHERE_API_KEY! }),
});
const res = await ctx.complete("What should I prioritize this week?");
console.log(res.content);- Default model:
command-a-plus-05-2026 - API key from
apiKeyoption or theCOHERE_API_KEYenv var - System messages map to Cohere's
preamble; prior turns map tochatHistory - Supports streaming via
ctx.stream(...)
MIT licensed.
