@kortyx/google
v0.4.0
Published
Google Gemini provider integration for Kortyx.
Maintainers
Readme
@kortyx/google
Google Gemini provider integration for Kortyx.
Install
pnpm add @kortyx/googlenpm install @kortyx/googleBasic usage
import { google } from "@kortyx/google";
import { useReason } from "kortyx";
export const answerNode = async ({ input }: { input: unknown }) => {
const result = await useReason({
id: "answer",
model: google("gemini-2.5-flash"),
input: String(input ?? ""),
stream: true,
emit: true,
});
return {
data: { text: result.text },
};
};The default google export reads one of these environment variables on first use:
GOOGLE_API_KEYGEMINI_API_KEYGOOGLE_GENERATIVE_AI_API_KEYKORTYX_GOOGLE_API_KEYKORTYX_GEMINI_API_KEY
If you want an app-local barrel, re-export it from a shared file:
// src/lib/providers.ts
export { google } from "@kortyx/google";Then import from that file where you use it.
Re-exporting
google("...")in that file, useimport { google } from "@kortyx/google".
Advanced usage
Use createGoogleGenerativeAI(...) when you want explicit app-owned setup or custom settings:
import { createGoogleGenerativeAI } from "@kortyx/google";
export const google = createGoogleGenerativeAI({
apiKey: process.env.GOOGLE_API_KEY,
});Documentation
License
Apache-2.0. See LICENSE.
