This PR introduces the content safety module, enabling users to utilize various models through a "content safety check input/output" flow.
Key enhancements include:
Parameter support in input/output rails flow definitions.
The addition of the is_content_safe output parser, which is shared between the content_safety and self_check modules. This new implementation maintains backward compatibility.
The introduction of a max_tokens field in TaskPrompt.
TODO and Remarks:
[x] Make shieldgemma example work, currently shieldgemma is not behaving correctly.
[ ] _MAX_TOKENS or default value of max_tokens in TaskPrompt
This PR introduces the content safety module, enabling users to utilize various models through a "content safety check input/output" flow.
Key enhancements include:
is_content_safe
output parser, which is shared between thecontent_safety
andself_check
modules. This new implementation maintains backward compatibility.max_tokens
field in TaskPrompt.TODO and Remarks: