Skip to content

Commit 0a0bcfc

Browse files
author
Guiners
committed
codereview fixes, url update
1 parent abbc90d commit 0a0bcfc

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

genai/tools/tools-google-maps-coordinates-with-txt.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ async function generateContent(
5555
// Example response:
5656
// 'Here are some of the top-rated places to get espresso near you: ...'
5757

58-
console.log(response.candidates[0].urlContextMetadata);
59-
6058
return response.text;
6159
}
6260
// [END googlegenaisdk_tools_google_maps_coordinates_with_txt]

genai/tools/tools-google-search-and-urlcontext-with-txt.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ async function generateContent(
4545

4646
const output = [];
4747

48-
if (
49-
response.candidates &&
50-
response.candidates[0] &&
51-
response.candidates[0].content.parts
52-
) {
48+
{
5349
for (const part of response.candidates[0].content.parts) {
5450
console.log(part.text);
5551
output.push(part.text);

genai/tools/tools-urlcontext-with-txt.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function generateContent(
3232
});
3333

3434
// TODO(developer): Here put your URLs!
35-
const url1 = 'https://cloud.google.com/vertex-ai/docs/generative-ai/start';
35+
const url1 = 'https://cloud.google.com/vertex-ai/generative-ai/docs';
3636
const url2 = 'https://cloud.google.com/docs/overview';
3737

3838
const response = await client.models.generateContent({
@@ -46,11 +46,7 @@ async function generateContent(
4646

4747
const output = [];
4848

49-
if (
50-
response.candidates &&
51-
response.candidates[0] &&
52-
response.candidates[0].content.parts
53-
) {
49+
{
5450
for (const part of response.candidates[0].content.parts) {
5551
console.log(part.text);
5652
output.push(part.text);

0 commit comments

Comments
 (0)