Revise Genkit installation instructions for Next.js#195
Revise Genkit installation instructions for Next.js#195LukeSchlangen wants to merge 1 commit intomainfrom
Conversation
Updated installation instructions for Genkit dependencies in Next.js documentation, including the addition of a model plugin and clarification on optional dependencies.
Summary of ChangesHello @LukeSchlangen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the Genkit installation guide for Next.js applications. It simplifies the initial dependency installation by bundling a common model plugin directly into the first Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request simplifies the Genkit installation instructions for Next.js by consolidating dependency installation into a single command and updating an import statement to reflect the new unified @genkit-ai/google-genai plugin. The changes make the setup process more straightforward for new users. My review includes a couple of suggestions to further improve the clarity of the documentation, ensuring users understand that the single google-genai package now supports both Google AI and Vertex AI, which will help them navigate the rest of the guide.
| Install the Genkit dependencies into your Next.js app: | ||
|
|
||
| 1. Install the core Genkit library and the Next.js plugin: | ||
| 1. Install the core Genkit library, the Next.js plugin, and at least one model plugin: |
There was a problem hiding this comment.
The phrase 'and at least one model plugin' could be confusing since the command that follows installs a specific one. To improve clarity, I suggest rephrasing to explicitly mention that @genkit-ai/google-genai is a unified plugin for both Google AI and Vertex AI. This will help users understand why they see tabs for both later in the document.
1. Install the core Genkit library, the Next.js plugin, and the unified Google GenAI plugin (which supports both the Gemini API and Vertex AI):
| <TabItem label="Gemini (Vertex AI)"> | ||
| ```ts | ||
| import { vertexAI } from '@genkit-ai/vertexai'; | ||
| import { vertexAI } from '@genkit-ai/google-genai'; |
There was a problem hiding this comment.
To avoid confusion for users who might wonder why vertexAI is being imported from @genkit-ai/google-genai under a 'Gemini (Vertex AI)' tab, it would be helpful to add a comment explaining that the @genkit-ai/google-genai package is a unified plugin that provides access to both Google AI and Vertex AI models.
// The unified @genkit-ai/google-genai plugin provides access to both Google AI and Vertex AI.
import { vertexAI } from '@genkit-ai/google-genai';
I think the previous import is now deprecated?
Updated installation instructions for Genkit dependencies in Next.js documentation, including the addition of a model plugin and clarification on optional dependencies.