Skip to content

Commit 63cc4d2

Browse files
author
Guiners
committed
fixing functions names
1 parent 3b6104d commit 63cc4d2

10 files changed

Lines changed: 17 additions & 17 deletions

genai/controlled-generation/ctrlgen-with-class-schema.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 generateClassSchema(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -75,5 +75,5 @@ async function generateContent(
7575
// [END googlegenaisdk_ctrlgen_with_class_schema]
7676

7777
module.exports = {
78-
generateContent,
78+
generateClassSchema,
7979
};

genai/controlled-generation/ctrlgen-with-enum-class-schema.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 generateEnumClassSchema(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -73,5 +73,5 @@ async function generateContent(
7373
// [END googlegenaisdk_ctrlgen_with_enum_class_schema]
7474

7575
module.exports = {
76-
generateContent,
76+
generateEnumClassSchema,
7777
};

genai/controlled-generation/ctrlgen-with-nested-class-schema.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 generateNestedClassSchema(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -74,5 +74,5 @@ async function generateContent(
7474
// [END googlegenaisdk_ctrlgen_with_nested_class_schema]
7575

7676
module.exports = {
77-
generateContent,
77+
generateNestedClassSchema,
7878
};

genai/controlled-generation/ctrlgen-with-nullable-schema.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 generateNullableSchema(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -86,5 +86,5 @@ async function generateContent(
8686
// [END googlegenaisdk_ctrlgen_with_nullable_schema]
8787

8888
module.exports = {
89-
generateContent,
89+
generateNullableSchema,
9090
};

genai/controlled-generation/ctrlgen-with-resp-schema.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 generateResponseSchema(
2424
projectId = GOOGLE_CLOUD_PROJECT,
2525
location = GOOGLE_CLOUD_LOCATION
2626
) {
@@ -82,5 +82,5 @@ async function generateContent(
8282
// [END googlegenaisdk_ctrlgen_with_resp_schema]
8383

8484
module.exports = {
85-
generateContent,
85+
generateResponseSchema,
8686
};

genai/test/ctrlgen-with-class-schema.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../controlled-generation/ctrlgen-with-class-schema.js');
2323
describe('ctrlgen-with-class-schema', () => {
2424
it('should generate text content in Json', async function () {
2525
this.timeout(10000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateClassSchema(projectId);
2727
assert(output.length > 0 && output.includes('Cookies'));
2828
});
2929
});

genai/test/ctrlgen-with-enum-class-schema.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../controlled-generation/ctrlgen-with-enum-class-schema.
2323
describe('ctrlgen-with-enum-class-schema', () => {
2424
it('should generate text content matching enum schema', async function () {
2525
this.timeout(10000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateEnumClassSchema(projectId);
2727
assert(output.length > 0 && output.includes('String'));
2828
});
2929
});

genai/test/ctrlgen-with-nested-class-schema.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('ctrlgen-with-nested-class-schema', () => {
2626
this.timeout(180000);
2727
this.retries(4);
2828
await delay(this.test);
29-
const output = await sample.generateContent(projectId);
30-
assert(output.length > 0 && output.includes('B'));
29+
const output = await sample.generateNestedClassSchema(projectId);
30+
assert(output.length > 0);
3131
});
3232
});

genai/test/ctrlgen-with-nullable-schema.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../controlled-generation/ctrlgen-with-nullable-schema.js
2323
describe('ctrlgen-with-nullable-schema', () => {
2424
it('should generate text content using nullable schema', async function () {
2525
this.timeout(10000);
26-
const output = await sample.generateContent(projectId);
27-
assert(output.length > 0 && output.includes('Day'));
26+
const output = await sample.generateNullableSchema(projectId);
27+
assert(output.length > 0);
2828
});
2929
});

genai/test/ctrlgen-with-resp-schema.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const sample = require('../controlled-generation/ctrlgen-with-resp-schema.js');
2323
describe('ctrlgen-with-resp-schema', () => {
2424
it('should generate text content in given schema', async function () {
2525
this.timeout(10000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateResponseSchema(projectId);
2727
assert(output.length > 0 && output.includes('Cookies'));
2828
});
2929
});

0 commit comments

Comments
 (0)