File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,12 +41,14 @@ async function generateContent(
4141
4242 console . log ( response . text ) ;
4343
44+ // Example response:
45+ // (Verse 1)
46+ // Sammy the nugget, a furry little friend
47+ // Had a knack for adventure, beyond all comprehend
48+
4449 return response . text ;
4550}
46- // Example response:
47- // (Verse 1)
48- // Sammy the nugget, a furry little friend
49- // Had a knack for adventure, beyond all comprehend
51+
5052// [END googlegenaisdk_textgen_async_with_txt]
5153
5254module . exports = {
Original file line number Diff line number Diff line change @@ -39,14 +39,14 @@ async function generateContent(
3939 } ) ) {
4040 console . log ( chunk . text ) ;
4141 }
42-
42+ // Example response:
43+ // The
44+ // sky appears blue due to a phenomenon called **Rayleigh scattering**. Here's
45+ // a breakdown of why:
46+ // ...
4347 return true ;
4448}
45- // Example response:
46- // The
47- // sky appears blue due to a phenomenon called **Rayleigh scattering**. Here's
48- // a breakdown of why:
49- // ...
49+
5050// [END googlegenaisdk_textgen_chat_stream_with_txt]
5151
5252module . exports = {
Original file line number Diff line number Diff line change @@ -47,11 +47,13 @@ async function generateContent(
4747 const response = await chatSession . sendMessage ( { message : 'Tell me a story.' } ) ;
4848 console . log ( response . text ) ;
4949
50+ // Example response:
51+ // Okay, here's a story for you:
52+ // ...
53+
5054 return response . text ;
5155}
52- // Example response:
53- // Okay, here's a story for you:
54- // ...
56+
5557// [END googlegenaisdk_textgen_chat_with_txt]
5658
5759module . exports = {
Original file line number Diff line number Diff line change @@ -51,12 +51,14 @@ async function generateContent(
5151
5252 console . log ( response . text ) ;
5353
54+ // Example response:
55+ // {
56+ // "explanation": "The sky appears blue due to a phenomenon called Rayleigh scattering. When ...
57+ // }
58+
5459 return response . text ;
5560}
56- // Example response:
57- // {
58- // "explanation": "The sky appears blue due to a phenomenon called Rayleigh scattering. When ...
59- // }
61+
6062// [END googlegenaisdk_textgen_config_with_txt]
6163
6264module . exports = {
Original file line number Diff line number Diff line change @@ -53,10 +53,11 @@ async function generateContent(
5353
5454 console . log ( response . text ) ;
5555
56+ // Example response:
57+ // The video shows several people surfing in an ocean with a coastline in the background. The camera ...
58+
5659 return response . text ;
5760}
58- // Example response:
59- // The video shows several people surfing in an ocean with a coastline in the background. The camera ...
6061// [END googlegenaisdk_textgen_with_mute_video]
6162
6263module . exports = {
You can’t perform that action at this time.
0 commit comments