From 358cbbfed0144b9a201b587613c141d283729c18 Mon Sep 17 00:00:00 2001 From: Drew Brown Date: Fri, 28 Jun 2024 10:21:16 -0600 Subject: [PATCH] chore: Remove extraneous safety settings in grounding sample (#3727) This streamlines the sample and better aligns it with other languages. --- .../snippets/grounding/groundingPublicDataBasic.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/generative-ai/snippets/grounding/groundingPublicDataBasic.js b/generative-ai/snippets/grounding/groundingPublicDataBasic.js index 748c1cfdf1..9f3564429f 100644 --- a/generative-ai/snippets/grounding/groundingPublicDataBasic.js +++ b/generative-ai/snippets/grounding/groundingPublicDataBasic.js @@ -13,11 +13,7 @@ // limitations under the License. // [START generativeaionvertexai_grounding_public_data_basic] -const { - VertexAI, - HarmCategory, - HarmBlockThreshold, -} = require('@google-cloud/vertexai'); +const {VertexAI} = require('@google-cloud/vertexai'); /** * TODO(developer): Update these variables before running the sample. @@ -32,14 +28,6 @@ async function generateContentWithGoogleSearchGrounding( const generativeModelPreview = vertexAI.preview.getGenerativeModel({ model: model, - // The following parameters are optional - // They can also be passed to individual content generation requests - safetySettings: [ - { - category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT, - threshold: HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE, - }, - ], generationConfig: {maxOutputTokens: 256}, });