Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion genai/controlled-generation/ctrlgen-with-enum-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function generateContent(
};

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: 'What type of instrument is an oboe?',
config: {
responseMimeType: 'text/x.enum',
Expand Down
2 changes: 1 addition & 1 deletion genai/count-tokens/counttoken-with-txt-vid.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function countTokens(
};

const response = await ai.models.countTokens({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: [video, 'Provide a description of the video.'],
});

Expand Down
2 changes: 1 addition & 1 deletion genai/count-tokens/counttoken-with-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function countTokens(
});

const response = await ai.models.countTokens({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: 'What is the highest mountain in Africa?',
});

Expand Down
2 changes: 1 addition & 1 deletion genai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "c8 mocha -p -j 2 --timeout 2400000 test/*.test.js test/**/*.test.js"
},
"dependencies": {
"@google/genai": "^0.13.0",
"@google/genai": "1.12.0",
"axios": "^1.6.2",
"supertest": "^7.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion genai/text-generation/textgen-sys-instr-with-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function generateContent(
`;

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: prompt,
config: {
systemInstruction: [
Expand Down
2 changes: 1 addition & 1 deletion genai/text-generation/textgen-with-multi-img.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function generateContent(
};

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: [
image1,
image2,
Expand Down
2 changes: 1 addition & 1 deletion genai/text-generation/textgen-with-txt-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function generateContent(
});

const response = await ai.models.generateContentStream({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: 'Why is the sky blue?',
});

Expand Down
2 changes: 1 addition & 1 deletion genai/text-generation/textgen-with-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function generateContent(
});

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: 'How does AI work?',
});

Expand Down
2 changes: 1 addition & 1 deletion genai/text-generation/textgen-with-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async function generateContent(
};

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: 'gemini-2.5-flash',
contents: [video, prompt],
});

Expand Down
4 changes: 3 additions & 1 deletion genai/tools/tools-code-exec-with-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ async function generateContent(
location: location,
});

const MODEL_NAME = 'gemini-2.5-flash';

const response = await ai.models.generateContent({
model: 'gemini-2.5-flash-preview-05-20',
model: MODEL_NAME,
contents:
'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.',
config: {
Expand Down
4 changes: 3 additions & 1 deletion genai/tools/tools-func-desc-with-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ async function generateContent(
trends in music consumption.
`;

const MODEL_NAME = 'gemini-2.5-flash';

const response = await ai.models.generateContent({
model: 'gemini-2.0-flash',
model: MODEL_NAME,
contents: prompt,
config: {
tools: [sales_tool],
Expand Down
Loading