Skip to content

Commit 8ab17d8

Browse files
author
Guiners
committed
adding samples, test, lints
1 parent a6a208b commit 8ab17d8

File tree

4 files changed

+25
-18
lines changed

4 files changed

+25
-18
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ async function generateContent(
8686
}
8787
}
8888

89+
// Example output:
90+
// > Compute the largest prime palindrome under 10
91+
// The largest prime palindrome under 10 is 7.
92+
8993
session.close();
9094
return turns;
9195
}
92-
// Example output:
93-
// > Compute the largest prime palindrome under 10
94-
// The largest prime palindrome under 10 is 7.
96+
9597
// [END googlegenaisdk_live_code_exec_with_txt]
9698

9799
module.exports = {

genai/live/live-func-call-with-txt.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,15 @@ async function generateContent(
109109
}
110110
}
111111

112+
// Example output:
113+
//>> Turn on the lights please
114+
// Model requested function call: turn_on_the_lights
115+
// Sent tool response for turn_on_the_lights: { result: 'ok' }
116+
112117
session.close();
113118
return turns;
114119
}
115-
// Example output:
116-
//>> Turn on the lights please
117-
// Model requested function call: turn_on_the_lights
118-
// Sent tool response for turn_on_the_lights: { result: 'ok' }
120+
119121
// [END googlegenaisdk_live_func_call_with_txt]
120122

121123
module.exports = {

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,18 @@ async function generateContent(
8181
console.log('Received text:', turn.text);
8282
}
8383
}
84+
85+
// Example output:
86+
//> When did the last Poland vs. Portugal soccer match happen?
87+
// Received text: The most recent match between Portugal and Poland took place on November 15,
88+
// Received text: 2024, where Portugal won 5-1. There was also a match
89+
// Received text: on October 12, 2024, where Poland won 3-1.
90+
8491
session.close();
8592
return turns;
8693
}
87-
// Example output:
88-
//> When did the last Poland vs. Portugal soccer match happen?
89-
// Received text: The most recent match between Portugal and Poland took place on November 15,
90-
// Received text: 2024, where Portugal won 5-1. There was also a match
91-
// Received text: on October 12, 2024, where Poland won 3-1.
92-
// // [END googlegenaisdk_live_ground_googsearch_with_txt]
94+
95+
// [END googlegenaisdk_live_ground_googsearch_with_txt]
9396

9497
module.exports = {
9598
generateContent,

genai/live/live-with-txt.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ async function generateContent(
7878
console.log('Received text:', turn.text);
7979
}
8080
}
81-
81+
// Example output:
82+
//> Hello? Gemini, are you there?
83+
// Received text: Yes
84+
// Received text: I'm here. How can I help you today?
8285
session.close();
8386
return turns;
8487
}
85-
// Example output:
86-
//> Hello? Gemini, are you there?
87-
// Received text: Yes
88-
// Received text: I'm here. How can I help you today?
88+
8989
// [END googlegenaisdk_live_with_txt]
9090

9191
module.exports = {

0 commit comments

Comments
 (0)