-
Notifications
You must be signed in to change notification settings - Fork 468
Closed as not planned
Labels
Description
Describe the bug
After I instantiated a sensitiveTopic validator and called its validate method, error message was issued.
found_topics = self.get_topics_zero_shot(value, invalid_topics)
AttributeError: 'SensitiveTopic' object has no attribute 'get_topics_zero_shot'
To Reproduce
Steps to reproduce the behavior:
sensitiveTopic = SensitiveTopic(
sensitive_topics=["conspiracy", "food", "entertainment", "politics", "religion", "violence", "hate"],
disable_classifier=False,
disable_llm=True,
on_fail=OnFailAction.EXCEPTION
)
result = sensitiveTopic.validate(value="Large corporations should act responsibly socially and environmentally. They should reduce carbon emission. One way to monitor their behavior is by reading their ESG Report.")
print(result.outcome)
Expected behavior
The guard should return a valid result
Library version:
0.5.2
Additional context
Add any other context about the problem here.