Skip to content

Censorship (Safety filters) setting on API #39

Answered by johnd0e
ujayden asked this question in Q&A
Discussion options

You must be logged in to vote

Could I know if there’s a way to disable the safety settings

It is already done:

const harmCategory = [
"HARM_CATEGORY_HATE_SPEECH",
"HARM_CATEGORY_SEXUALLY_EXPLICIT",
"HARM_CATEGORY_DANGEROUS_CONTENT",
"HARM_CATEGORY_HARASSMENT",
"HARM_CATEGORY_CIVIC_INTEGRITY",
];
const safetySettings = harmCategory.map(category => ({
category,
threshold: "BLOCK_NONE",
}));

Also AFAIK the new models have them not enabled by default.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ujayden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants