Skip to content

Commit 0d7d240

Browse files
author
Guiners
committed
linter changes and gemini code review fixes
1 parent 6f3a710 commit 0d7d240

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function generateLiveConversation(
9494
turns: [{role: 'user', parts: [{text: textInput}]}],
9595
});
9696

97-
const audioChunks = await handleTurn(session);
97+
const audioChunks = await handleTurn();
9898

9999
session.close();
100100

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ async function generateLiveRagTextResponse(
9090
},
9191
});
9292

93-
const textInput =
94-
"What year did Mariusz Pudzianowski win World's Strongest Man?";
93+
const textInput = 'What are newest gemini models?';
9594
console.log('> ', textInput, '\n');
9695

9796
await session.sendClientContent({
@@ -110,8 +109,8 @@ async function generateLiveRagTextResponse(
110109
console.log(response.join(''));
111110

112111
// Example output:
113-
// > What year did Mariusz Pudzianowski win World's Strongest Man?
114-
// Mariusz Pudzianowski won World's Strongest Man in 2002, 2003, 2005, 2007, and 2008.
112+
// > What are newest gemini models?
113+
// In December 2023, Google launched Gemini, their "most capable and general model". It's multimodal, meaning it understands and combines different types of information like text, code, audio, images, and video.
115114

116115
session.close();
117116

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
'use strict';
1818

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

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('live-ground-ragengine-with-txt', () => {
2727
mockSession = {
2828
async *receive() {
2929
yield {
30-
text: 'Mariusz Pudzianowski won in 2002, 2003, 2005, 2007, and 2008.',
30+
text: 'In December 2023, Google launched Gemini, their "most capable and general model". It\'s multimodal, meaning it understands and combines different types of information like text, code, audio, images, and video.',
3131
};
3232
},
3333
sendClientContent: sinon.stub().resolves(),
@@ -56,7 +56,6 @@ describe('live-ground-ragengine-with-txt', () => {
5656

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

59-
assert.isArray(output);
60-
assert.isNotEmpty(output);
59+
assert(output.length > 0);
6160
});
6261
});

0 commit comments

Comments
 (0)