You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return two sets and + operator cannot form a new array
To Reproduce
Steps to reproduce the behavior:
restrictToTopic = RestrictToTopic(
valid_topics=["environment"],
invalid_topics=["conspiracy", "food", "entertainment", "politics", "religion", "violence", "hate"],
disable_classifier=False,
disable_llm=True,
on_fail=OnFailAction.EXCEPTION
)
result = restrictToTopic.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 _inference_local should return a found_topics array.
Library version:
Version 0.5.2
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
@JosephCatrambone Thank you. Do you know when guardrails will have a new release? I am evaluating guardrails and LLM guards. While guardrails ai has more broken validators and missing validators (e.g., prompt refusal), it has more validators for detecting hallucinations and better error messages. Both are very good for me.
I'm going to close this as resolved since the test in the first is passing, but if there's still a problem please feel free to reopen this ticket and I'll take another swing at it. Thanks again for reporting the issue.
Describe the bug
When disable_classifier is False and disable_llm is True, the _inference_local method returns error on
The error message is
It is because
return two sets and + operator cannot form a new array
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The _inference_local should return a
found_topics
array.Library version:
Version 0.5.2
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: