// Using component configuration
const safetyNode = new SafetyCheckerNode({
id: 'content-safety-check',
modelWeightsPath: '/models/safety_weights.json',
safetyConfig: {
forbiddenTopics: [
{ topicName: TopicName.Violence, threshold: 0.7 },
{ topicName: TopicName.Profanity, threshold: 0.8 }
]
}
});
// Using existing safety checker component
const safetyComponent = new SafetyCheckerComponent({
id: 'existing-safety-component',
modelWeightsPath: '/models/safety_weights.json'
});
const safetyNodeWithComponent = new SafetyCheckerNode({
id: 'content-safety-check',
safetyCheckerComponent: safetyComponent
});