-
Notifications
You must be signed in to change notification settings - Fork 70
Revise Genkit installation instructions for Next.js #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,33 +52,13 @@ The `--src-dir` flag creates a `src/` directory to keep your project organized b | |
|
|
||
| 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: | ||
|
|
||
| ```bash | ||
| npm install genkit @genkit-ai/next | ||
| npm install genkit @genkit-ai/next @genkit-ai/google-genai | ||
| ``` | ||
|
|
||
| 2. Install at least one model plugin. | ||
|
|
||
| <Tabs syncKey="model-provider"> | ||
| <TabItem label="Gemini (Google AI)"> | ||
|
|
||
| ```bash | ||
| npm install @genkit-ai/google-genai | ||
| ``` | ||
|
|
||
| </TabItem> | ||
| <TabItem label="Gemini (Vertex AI)"> | ||
|
|
||
| ```bash | ||
| npm install @genkit-ai/vertexai | ||
| ``` | ||
|
|
||
| </TabItem> | ||
|
|
||
| </Tabs> | ||
|
|
||
| 3. Install the Genkit CLI globally. The tsx tool is also recommended as a development dependency, as it makes testing your code more convenient. Both of these dependencies are optional, however. | ||
| 2. Install the Genkit CLI globally. The tsx tool is also recommended as a development dependency, as it makes testing your code more convenient. Both of these dependencies are optional, however. | ||
|
|
||
| ```bash | ||
| npm install -g genkit-cli | ||
|
|
@@ -127,7 +107,7 @@ For example, create `src/genkit/menuSuggestionFlow.ts`: | |
| </TabItem> | ||
| <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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid confusion for users who might wonder why |
||
| import { genkit, z } from 'genkit'; | ||
|
|
||
| const ai = genkit({ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-genaiis 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.