Skip to content

Commit

Permalink
chore: Remove extraneous safety settings in grounding sample (#3727)
Browse files Browse the repository at this point in the history
This streamlines the sample and better aligns it with other languages.
  • Loading branch information
arbrown authored Jun 28, 2024
1 parent 7744b29 commit 358cbbf
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions generative-ai/snippets/grounding/groundingPublicDataBasic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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},
});

Expand Down

0 comments on commit 358cbbf

Please sign in to comment.