Skip to content

Commit 3e2988c

Browse files
ifielkerIngrid Fielker
andauthored
docs: Update some docs and samples to use the new google-genai plugin (#3478)
Co-authored-by: Ingrid Fielker <[email protected]>
1 parent 2b43449 commit 3e2988c

File tree

12 files changed

+4143
-1007
lines changed

12 files changed

+4143
-1007
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ Get started with just a few lines of code:
1313

1414
```ts
1515
import { genkit } from 'genkit';
16-
import { googleAI } from '@genkit-ai/googleai';
16+
import { googleAI } from '@genkit-ai/google-genai';
1717

1818
const ai = genkit({ plugins: [googleAI()] });
1919

2020
const { text } = await ai.generate({
21-
model: googleAI.model('gemini-2.0-flash'),
21+
model: googleAI.model('gemini-2.5-flash'),
2222
prompt: 'Why is Firebase awesome?'
2323
});
2424
```
@@ -155,9 +155,9 @@ Want to skip the local setup? Click below to try out Genkit using [Firebase Stud
155155

156156
- [**Join us on Discord**](https://discord.gg/qXt5zzQKpc) – Get help, share
157157
ideas, and chat with other developers.
158-
- [**Contribute on GitHub**](https://github.com/firebase/genkit/issues) – Report
158+
- [**Contribute on GitHub**](https://github.com/firebase/genkit/issues) – Report
159159
bugs, suggest features, or explore the source code.
160-
- [**Contribute to Documentation and Samples**](https://github.com/genkit-ai/) – Report
160+
- [**Contribute to Documentation and Samples**](https://github.com/genkit-ai/) – Report
161161
issues in Genkit's [documentation](https://github.com/genkit-ai/docsite), or contribute to the [samples](https://github.com/genkit-ai/samples).
162162

163163
## Contributing

genkit-tools/cli/context/GENKIT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This document provides rules and examples for building with the Genkit API in No
3939
```ts
4040
// src/index.ts
4141
import { genkit, z } from 'genkit';
42-
import { googleAI } from '@genkit-ai/googleai';
42+
import { googleAI } from '@genkit-ai/google-genai';
4343
4444
export const ai = genkit({
4545
plugins: [googleAI()],

js/genkit/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Get started with Genkit in just a few lines of simple code.
2020
```ts
2121
// import the Genkit and Google AI plugin libraries
2222
import { genkit } from 'genkit';
23-
import { googleAI } from '@genkit-ai/googleai';
23+
import { googleAI } from '@genkit-ai/google-genai';
2424

2525
const ai = genkit({ plugins: [googleAI()] });
2626

@@ -33,7 +33,7 @@ const { text } = await ai.generate({
3333
Genkit also lets you build strongly typed, accessible from the client, fully observable AI flows:
3434

3535
```ts
36-
import { googleAI } from '@genkit-ai/googleai';
36+
import { googleAI } from '@genkit-ai/google-genai';
3737
import { genkit, z } from 'genkit';
3838

3939
// Initialize Genkit with the Google AI plugin

js/plugins/mcp/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm i genkit @genkit-ai/mcp
1717
To connect to one or more MCP servers, you use the `createMcpHost` function. This function returns a `GenkitMcpHost` instance that manages connections to the configured MCP servers.
1818

1919
```ts
20-
import { googleAI } from '@genkit-ai/googleai';
20+
import { googleAI } from '@genkit-ai/google-genai';
2121
import { createMcpHost } from '@genkit-ai/mcp';
2222
import { genkit } from 'genkit';
2323

@@ -63,7 +63,7 @@ The `createMcpHost` function initializes a `GenkitMcpHost` instance, which handl
6363
- **`version`**: (optional, string) The version of the MCP host plugin. Defaults to "1.0.0".
6464
- **`rawToolResponses`**: (optional, boolean) When `true`, tool responses are returned in their raw MCP format; otherwise, they are processed for Genkit compatibility. Defaults to `false`.
6565
- **`mcpServers`**: (required, object) An object where each key is a client-side name (namespace) for an MCP server, and the value is the configuration for that server.
66-
66+
6767
Each server configuration object can include:
6868
- **`disabled`**: (optional, boolean) If `true`, this server connection will not be attempted. Defaults to `false`.
6969
- One of the following server connection configurations:
@@ -80,7 +80,7 @@ The `createMcpHost` function initializes a `GenkitMcpHost` instance, which handl
8080
For scenarios where you only need to connect to a single MCP server, or prefer to manage client instances individually, you can use `createMcpClient`.
8181

8282
```ts
83-
import { googleAI } from '@genkit-ai/googleai';
83+
import { googleAI } from '@genkit-ai/google-genai';
8484
import { createMcpClient } from '@genkit-ai/mcp';
8585
import { genkit } from 'genkit';
8686

@@ -146,7 +146,7 @@ MCP tools return a `content` array as opposed to a structured response like most
146146
You can also expose all of the tools and prompts from a Genkit instance as an MCP server using the `createMcpServer` function.
147147

148148
```ts
149-
import { googleAI } from '@genkit-ai/googleai';
149+
import { googleAI } from '@genkit-ai/google-genai';
150150
import { createMcpServer } from '@genkit-ai/mcp';
151151
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
152152
import { genkit, z } from 'genkit/beta';

samples/js-angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ Then access the application at [http://localhost:4200/](http://localhost:4200/)
4545
The application is built with:
4646
- Angular for the frontend framework
4747
- Genkit for AI integration
48-
- Gemini 2.0 Flash for the AI model
48+
- Gemini 2.5 Flash for the AI model

0 commit comments

Comments
 (0)