Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions js/doc-snippets/src/flows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const menuSuggestionFlow = ai.defineFlow(
},
async (restaurantTheme) => {
const { text } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`,
});
return text;
Expand All @@ -51,7 +51,7 @@ export const menuSuggestionFlowWithSchema = ai.defineFlow(
},
async (restaurantTheme) => {
const { output } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`,
output: { schema: MenuItemSchema },
});
Expand All @@ -72,7 +72,7 @@ export const menuSuggestionFlowMarkdown = ai.defineFlow(
},
async (restaurantTheme) => {
const { output } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`,
output: { schema: MenuItemSchema },
});
Expand All @@ -94,7 +94,7 @@ export const menuSuggestionStreamingFlow = ai.defineFlow(
},
async (restaurantTheme, { sendChunk }) => {
const response = await ai.generateStream({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: `Invent a menu item for a ${restaurantTheme} themed restaurant.`,
});

Expand Down Expand Up @@ -128,7 +128,7 @@ export const complexMenuSuggestionFlow = ai.defineFlow(
outputSchema: PrixFixeMenuSchema,
},
async (theme: string): Promise<z.infer<typeof PrixFixeMenuSchema>> => {
const chat = ai.chat({ model: googleAI.model('gemini-2.0-flash') });
const chat = ai.chat({ model: googleAI.model('gemini-2.5-flash') });
await chat.send('What makes a good prix fixe menu?');
await chat.send(
'What are some ingredients, seasonings, and cooking techniques that ' +
Expand Down Expand Up @@ -178,7 +178,7 @@ Today's menu
}
);
const { text } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
system: "Help the user answer questions about today's menu.",
prompt: input,
docs: [{ content: [{ text: menu }] }],
Expand Down
2 changes: 1 addition & 1 deletion js/doc-snippets/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { genkit } from 'genkit';

const ai = genkit({
plugins: [googleAI()],
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
});

async function main() {
Expand Down
6 changes: 3 additions & 3 deletions js/doc-snippets/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import { genkit } from 'genkit';

const ai = genkit({
plugins: [googleAI()],
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
});

async function fn01() {
// [START ex01]
const { text } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: 'Invent a menu item for a pirate themed restaurant.',
});
// [END ex01]
Expand All @@ -34,7 +34,7 @@ async function fn01() {
async function fn02() {
// [START ex02]
const { text } = await ai.generate({
model: 'googleai/gemini-2.0-flash-001',
model: 'googleai/gemini-2.5-flash',
prompt: 'Invent a menu item for a pirate themed restaurant.',
});
// [END ex02]
Expand Down
2 changes: 1 addition & 1 deletion js/doc-snippets/src/models/minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { genkit } from 'genkit';

const ai = genkit({
plugins: [googleAI()],
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
});

async function main() {
Expand Down
2 changes: 1 addition & 1 deletion js/testapps/dev-ui-gallery/prompts/code.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: googleai/gemini-2.0-flash
model: googleai/gemini-2.5-flash
config:
temperature: 0.4
safetySettings:
Expand Down
2 changes: 1 addition & 1 deletion js/testapps/dev-ui-gallery/prompts/markdown.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: googleai/gemini-2.0-flash
model: googleai/gemini-2.5-flash
config:
temperature: 0.4
safetySettings:
Expand Down
2 changes: 1 addition & 1 deletion js/testapps/flow-simple-ai/prompts/dotpromptContext.prompt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
model: vertexai/gemini-2.0-flash
model: vertexai/gemini-2.5-flash
input:
schema:
question: string
Expand Down
18 changes: 9 additions & 9 deletions js/testapps/flow-simple-ai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const streamFlowVertex = ai.defineFlow(
},
async (prompt, { sendChunk }) => {
const { response, stream } = ai.generateStream({
model: vertexAI.model('gemini-2.0-flash-001', { temperature: 0.77 }),
model: vertexAI.model('gemini-2.5-flash', { temperature: 0.77 }),
prompt,
});

Expand All @@ -171,7 +171,7 @@ export const streamFlowGemini = ai.defineFlow(
},
async (prompt, { sendChunk }) => {
const { response, stream } = ai.generateStream({
model: googleAI.model('gemini-2.0-flash-001', { temperature: 0.77 }),
model: googleAI.model('gemini-2.5-flash', { temperature: 0.77 }),
prompt,
});

Expand Down Expand Up @@ -207,7 +207,7 @@ export const streamJsonFlow = ai.defineFlow(
},
async (count, { sendChunk }) => {
const { response, stream } = ai.generateStream({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
output: {
schema: GameCharactersSchema,
},
Expand Down Expand Up @@ -506,7 +506,7 @@ export const dynamicToolCaller = ai.defineFlow(
);

const { response, stream } = ai.generateStream({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
config: {
temperature: 1,
},
Expand Down Expand Up @@ -901,7 +901,7 @@ ai.defineFlow(
},
async ({ url, prompt, model }) => {
const { text } = await ai.generate({
model: model || 'googleai/gemini-2.0-flash',
model: model || 'googleai/gemini-2.5-flash',
prompt: [{ text: prompt }, { media: { url, contentType: 'video/mp4' } }],
});
return text;
Expand Down Expand Up @@ -1112,7 +1112,7 @@ async function saveWaveFile(

ai.defineFlow('googleSearch', async (thing) => {
const { text } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: `What is a banana?`,
config: { tools: [{ googleSearch: {} }] },
});
Expand All @@ -1122,7 +1122,7 @@ ai.defineFlow('googleSearch', async (thing) => {

ai.defineFlow('googleSearchRetrieval', async (thing) => {
const { text } = await ai.generate({
model: vertexAI.model('gemini-2.0-flash'),
model: vertexAI.model('gemini-2.5-flash'),
prompt: `What is a banana?`,
config: { googleSearchRetrieval: {} },
});
Expand All @@ -1144,7 +1144,7 @@ ai.defineFlow('googleai-imagen', async (thing) => {

ai.defineFlow('meme-of-the-day', async () => {
const { text: script } = await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt:
'Write a detailed script for a 8 second video. The video should be a meme of the day. ' +
'A Silly DIY FAIL situation like a: broken tools, or bad weather or crooked assembly, etc. Be creative. The FAIL should be very obvious. ' +
Expand Down Expand Up @@ -1266,7 +1266,7 @@ ai.defineResource(

ai.defineFlow('resource', async () => {
return await ai.generate({
model: googleAI.model('gemini-2.0-flash'),
model: googleAI.model('gemini-2.5-flash'),
prompt: [
{ text: 'analyze this: ' },
{ resource: { uri: 'my://resource/value' } },
Expand Down
1 change: 0 additions & 1 deletion js/testapps/format-tester/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ if (!models.length) {
'vertexai/gemini-2.5-flash',
'googleai/gemini-2.5-pro',
'googleai/gemini-2.5-flash',
'googleai/gemini-2.0-flash',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getStoreInfoTool } from '../tools';
// Simple agent for providing store information
export const agent = ai.definePrompt({
name: 'representativeAgent',
model: 'googleai/gemini-2.0-flash',
model: 'googleai/gemini-2.5-flash',
description: 'Representative Agent can provide store info',
tools: [getStoreInfoTool],
system: `You are a customer service representative for TechStore Computer Shop.
Expand Down
2 changes: 1 addition & 1 deletion py/samples/dev-local-vectorstore-hello/src/hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
embedder='vertexai/text-embedding-004',
),
],
model='vertexai/gemini-2.0.',
model='vertexai/gemini-2.5-flash',
)

films = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

ai = Genkit(
plugins=[GoogleAI()],
model=googleai_name('gemini-2.0-flash-exp'),
model=googleai_name('gemini-2.5-flash'),
)


Expand Down
8 changes: 4 additions & 4 deletions py/samples/google-genai-hello/src/google_genai_hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
])
),
],
model='googleai/gemini-2.5-flash-preview-04-17',
model='googleai/gemini-2.5-flash',
)


Expand Down Expand Up @@ -116,7 +116,7 @@ async def simple_generate_with_tools_flow(value: int, ctx: ActionRunContext) ->
The generated response with a function.
"""
response = await ai.generate(
model='googleai/gemini-2.0-flash',
model='googleai/gemini-2.5-flash',
prompt=f'what is a gablorken of {value}',
tools=['gablorkenTool'],
on_chunk=ctx.send_chunk,
Expand Down Expand Up @@ -149,7 +149,7 @@ async def simple_generate_with_interrupts(value: int) -> str:
The generated response with a function.
"""
response1 = await ai.generate(
model='googleai/gemini-2.0-flash',
model='googleai/gemini-2.5-flash',
messages=[
Message(
role=Role.USER,
Expand All @@ -164,7 +164,7 @@ async def simple_generate_with_interrupts(value: int) -> str:

tr = tool_response(response1.interrupts[0], 178)
response = await ai.generate(
model='googleai/gemini-2.0-flash',
model='googleai/gemini-2.5-flash',
messages=response1.messages,
tool_responses=[tr],
tools=['gablorkenTool'],
Expand Down
4 changes: 2 additions & 2 deletions py/samples/google-genai-image/src/google_genai_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def draw_image_with_gemini() -> str:
return await ai.generate(
prompt='Draw a cat in a hat.',
config={'response_modalities': ['Text', 'Image']},
model=googleai_name('gemini-2.0-flash-exp'),
model=googleai_name('gemini-2.5-flash'),
)


Expand All @@ -64,7 +64,7 @@ async def describe_image_with_gemini(data: str) -> str:
],
),
],
model=googleai_name('gemini-2.5-pro-preview-03-25'),
model=googleai_name('gemini-2.5-flash'),
)
return result.text

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

ai = Genkit(
plugins=[VertexAI()],
model='vertexai/gemini-2.0-flash',
model='vertexai/gemini-2.5-flash',
)


Expand Down
2 changes: 1 addition & 1 deletion py/samples/short-n-long/src/short_n_long/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

ai = Genkit(
plugins=[GoogleAI()],
model=googleai_name('gemini-2.0-flash-exp'),
model=googleai_name('gemini-2.5-flash'),
)


Expand Down
Loading