[JS] Simplify Genkit libraries and imports
chrisraygill opened this issue · comments
Is your feature request related to a problem? Please describe.
Currently, imports for our default sample look intimidating due to Genkit capabilities being spread across multiple libraries. The below code is from the default sample generated by 'genkit init' when selecting the Firebase and Google AI option.
import {generate} from "@genkit-ai/ai";
import {configureGenkit} from "@genkit-ai/core";
import {firebaseAuth} from "@genkit-ai/firebase/auth";
import {onFlow} from "@genkit-ai/firebase/functions";
import * as z from "zod";
import {firebase} from "@genkit-ai/firebase";
import {googleAI, gemini15Flash} from "@genkit-ai/googleai";
Describe the solution you'd like
I would like to consolidate these imports to reduce the number of lines and make the experience feel simpler and cleaner. I suggest:
- Combining @genkit-ai/ai and @genkit-ai/core packages
- Simplifying imports from @genkit-ai/firebase - do firebaseAuth, onFlow, and firebase need to be imported separately?
If the changes are made, the import should look something like this:
import {configureGenkit, generate} from "@genkit-ai/core";
import {firebase, firebaseAuth, onFlow} from "@genkit-ai/firebase";
import * as z from "zod";
import {googleAI, gemini15Flash} from "@genkit-ai/googleai";
Describe alternatives you've considered
N/A
Additional context
Add any other context or screenshots about the feature request here.