Skip to content

Commit 358cbbf

Browse files
authored
chore: Remove extraneous safety settings in grounding sample (#3727)
This streamlines the sample and better aligns it with other languages.
1 parent 7744b29 commit 358cbbf

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

generative-ai/snippets/grounding/groundingPublicDataBasic.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
// limitations under the License.
1414

1515
// [START generativeaionvertexai_grounding_public_data_basic]
16-
const {
17-
VertexAI,
18-
HarmCategory,
19-
HarmBlockThreshold,
20-
} = require('@google-cloud/vertexai');
16+
const {VertexAI} = require('@google-cloud/vertexai');
2117

2218
/**
2319
* TODO(developer): Update these variables before running the sample.
@@ -32,14 +28,6 @@ async function generateContentWithGoogleSearchGrounding(
3228

3329
const generativeModelPreview = vertexAI.preview.getGenerativeModel({
3430
model: model,
35-
// The following parameters are optional
36-
// They can also be passed to individual content generation requests
37-
safetySettings: [
38-
{
39-
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
40-
threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE,
41-
},
42-
],
4331
generationConfig: {maxOutputTokens: 256},
4432
});
4533

0 commit comments

Comments
 (0)