Skip to content

Commit 6f3a710

Browse files
author
Guiners
committed
fixing functions names
1 parent 41fe9ca commit 6f3a710

10 files changed

+21
-21
lines changed

genai/live/live-audio-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const fs = require('fs');
2222
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2323
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2424

25-
async function generateContent(
25+
async function generateLiveConversation(
2626
projectId = GOOGLE_CLOUD_PROJECT,
2727
location = GOOGLE_CLOUD_LOCATION
2828
) {
@@ -114,5 +114,5 @@ async function generateContent(
114114
// [END googlegenaisdk_live_audio_with_txt]
115115

116116
module.exports = {
117-
generateContent,
117+
generateLiveConversation,
118118
};

genai/live/live-ground-ragengine-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2525
const MEMORY_CORPUS =
2626
'projects/cloud-ai-devrel-softserve/locations/us-central1/ragCorpora/2305843009213693952';
2727

28-
async function generateContent(
28+
async function generateLiveRagTextResponse(
2929
memoryCorpus = MEMORY_CORPUS,
3030
projectId = GOOGLE_CLOUD_PROJECT,
3131
location = GOOGLE_CLOUD_LOCATION
@@ -121,5 +121,5 @@ async function generateContent(
121121
// [END googlegenaisdk_live_ground_ragengine_with_txt]
122122

123123
module.exports = {
124-
generateContent,
124+
generateLiveRagTextResponse,
125125
};

genai/live/live-structured-ouput-with-txt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const CalendarEventSchema = {
3535
required: ['name', 'date', 'participants'],
3636
};
3737

38-
async function generateContent(
38+
async function generateStructuredTextResponse(
3939
projectId = GOOGLE_CLOUD_PROJECT,
4040
location = GOOGLE_CLOUD_LOCATION
4141
) {
@@ -89,5 +89,5 @@ async function generateContent(
8989
// [END googlegenaisdk_live_structured_output_with_txt]
9090

9191
module.exports = {
92-
generateContent,
92+
generateStructuredTextResponse,
9393
};

genai/live/live-transcribe-with-audio.js

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

24-
async function generateContent(
24+
async function generateLiveAudioTranscription(
2525
projectId = GOOGLE_CLOUD_PROJECT,
2626
location = GOOGLE_CLOUD_LOCATION
2727
) {
@@ -102,5 +102,5 @@ async function generateContent(
102102
// [END googlegenaisdk_live_transcribe_with_audio]
103103

104104
module.exports = {
105-
generateContent,
105+
generateLiveAudioTranscription,
106106
};

genai/live/live-txt-with-audio.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
'use strict';
1818

1919
const {GoogleGenAI, Modality} = require('@google/genai');
20-
const fetch = require('node-fetch');
21-
//todo
20+
// const fetch = require('node-fetch');
21+
//todo try unittest and uncomment it if its needed
2222
const GOOGLE_CLOUD_PROJECT = process.env.GOOGLE_CLOUD_PROJECT;
2323
const GOOGLE_CLOUD_LOCATION = process.env.GOOGLE_CLOUD_LOCATION || 'global';
2424

25-
async function generateContent(
25+
async function generateLiveConversation(
2626
projectId = GOOGLE_CLOUD_PROJECT,
2727
location = GOOGLE_CLOUD_LOCATION
2828
) {
@@ -108,5 +108,5 @@ async function generateContent(
108108
// [END googlegenaisdk_live_txt_with_audio]
109109

110110
module.exports = {
111-
generateContent,
111+
generateLiveConversation,
112112
};

genai/test/live-audio-with-txt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const projectId = process.env.CAIP_PROJECT_ID;
2121
const sample = require('../live/live-audio-with-txt');
2222

2323
describe('live-audio-with-txt', () => {
24-
it('should generate audio content from a text prompt', async function () {
24+
it('should generate audio content in a live session conversation from a text prompt', async function () {
2525
this.timeout(180000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateLiveConversation(projectId);
2727
console.log('Generated output:', output);
2828
assert(output.length > 0);
2929
});

genai/test/live-ground-ragengine-with-txt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('live-ground-ragengine-with-txt', () => {
5252
it('should return text from mocked RAG session', async function () {
5353
this.timeout(5000);
5454

55-
const output = await sample.generateContent();
55+
const output = await sample.generateLiveRagTextResponse();
5656

5757
console.log('Generated output:', output);
5858

genai/test/live-structured-ouput-with-txt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const projectId = process.env.CAIP_PROJECT_ID;
2121
const sample = require('../live/live-structured-ouput-with-txt');
2222

2323
describe('live-structured-ouput-with-txt', () => {
24-
it('should generate audio content from a text prompt', async function () {
24+
it('should extract structured information from text input using the model', async function () {
2525
this.timeout(18000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateStructuredTextResponse(projectId);
2727
console.log('Generated output:', output);
2828
assert(output.length > 0);
2929
});

genai/test/live-transcribe-with-audio.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const projectId = process.env.CAIP_PROJECT_ID;
2121
const sample = require('../live/live-transcribe-with-audio');
2222

2323
describe('live-transcribe-with-audio', () => {
24-
it('should generate text content from a text prompt and multiple images', async function () {
24+
it('should transcribe audio input into text using the live model', async function () {
2525
this.timeout(180000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateLiveAudioTranscription(projectId);
2727
console.log('Generated output:', output);
2828
assert(output.length > 0);
2929
});

genai/test/live-txt-with-audio.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const projectId = process.env.CAIP_PROJECT_ID;
2121
const sample = require('../live/live-txt-with-audio');
2222

2323
describe('live-txt-with-audio', () => {
24-
it('should generate audio content from a text prompt', async function () {
24+
it('should generate txt content in a live session from an audio', async function () {
2525
this.timeout(18000);
26-
const output = await sample.generateContent(projectId);
26+
const output = await sample.generateLiveConversation(projectId);
2727
console.log('Generated output:', output);
2828
assert(output.length > 0);
2929
});

0 commit comments

Comments
 (0)