Skip to content

Commit 22b85c3

Browse files
author
Guiners
committed
fixing functions names
1 parent fe799d1 commit 22b85c3

9 files changed

+13
-13
lines changed

genai/test/tools-code-exec-with-txt-local-img.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../tools/tools-code-exec-with-txt-local-img.js');
2323
describe('tools-code-exec-with-txt-local-img', () => {
2424
it('should generate a function definition', async function () {
2525
this.timeout(100000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateAndExecuteMultimodalCode(projectId);
2727
assert(output.length > 0);
2828
});
2929
});

genai/test/tools-code-exec-with-txt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('tools-code-exec-with-txt', async () => {
2626
this.timeout(180000);
2727
this.retries(4);
2828
await delay(this.test);
29-
const output = await sample.generateContent(projectId);
29+
const output = await sample.generateAndExecuteCode(projectId);
3030
assert(output.length > 0);
3131
});
3232
});

genai/test/tools-func-desc-with-txt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ describe('tools-func-desc-with-txt', async () => {
2525
this.timeout(180000);
2626
this.retries(4);
2727
await delay(this.test);
28-
await sample.generateContent(projectId);
28+
await sample.generateFunctionDesc(projectId);
2929
});
3030
});

genai/test/tools-google-search-with-txt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../tools/tools-google-search-with-txt.js');
2323
describe('tools-google-search-with-txt', () => {
2424
it('should generate answer to a question in prompt using google search', async function () {
2525
this.timeout(10000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateGoogleSearch(projectId);
2727
assert(output.length > 0);
2828
});
2929
});

genai/tools/tools-code-exec-with-txt-local-img.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const {GoogleGenAI} = require('@google/genai');
2323
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2424
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2525

26-
async function generateContent(
26+
async function generateAndExecuteMultimodalCode(
2727
projectId = GOOGLE_CLOUD_PROJECT,
2828
location = GOOGLE_CLOUD_LOCATION
2929
) {
@@ -35,7 +35,7 @@ async function generateContent(
3535

3636
const imagePath = path.join(
3737
__dirname,
38-
'../test-data/640px-Monty_open_door.svg.png'
38+
'../test/test-data/640px-Monty_open_door.svg.png'
3939
);
4040
const imageBuffer = await fs.readFile(imagePath);
4141
const imageBase64 = imageBuffer.toString('base64');
@@ -91,5 +91,5 @@ async function generateContent(
9191
// [END googlegenaisdk_tools_code_exec_with_txt]
9292

9393
module.exports = {
94-
generateContent,
94+
generateAndExecuteMultimodalCode,
9595
};

genai/tools/tools-code-exec-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const {GoogleGenAI} = require('@google/genai');
2020
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2121
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2222

23-
async function generateContent(
23+
async function generateAndExecuteCode(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -72,5 +72,5 @@ async function generateContent(
7272
// [END googlegenaisdk_tools_code_exec_with_txt]
7373

7474
module.exports = {
75-
generateContent,
75+
generateAndExecuteCode,
7676
};

genai/tools/tools-func-desc-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const {GoogleGenAI, Type} = require('@google/genai');
1919

2020
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2121
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
22-
async function generateContent(
22+
async function generateFunctionDesc(
2323
projectId = GOOGLE_CLOUD_PROJECT,
2424
location = GOOGLE_CLOUD_LOCATION
2525
) {
@@ -101,5 +101,5 @@ async function generateContent(
101101
// [END googlegenaisdk_tools_func_desc_with_txt]
102102

103103
module.exports = {
104-
generateContent,
104+
generateFunctionDesc,
105105
};

genai/tools/tools-google-search-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const {GoogleGenAI} = require('@google/genai');
2020
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2121
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2222

23-
async function generateContent(
23+
async function generateGoogleSearch(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -53,5 +53,5 @@ async function generateContent(
5353
// [END googlegenaisdk_tools_google_search_with_txt]
5454

5555
module.exports = {
56-
generateContent,
56+
generateGoogleSearch,
5757
};

0 commit comments

Comments
 (0)