Skip to main content

safety.py

Source: sunholo/vertex/safety.py

Functions

genai_safety(threshold: str = 'BLOCK_ONLY_HIGH')

BLOCK_ONLY_HIGH - block when high probability of unsafe content is detected BLOCK_MEDIUM_AND_ABOVE - block when medium or high probability of content is detected BLOCK_LOW_AND_ABOVE - block when low, medium, or high probability of unsafe content is detected BLOCK_NONE - no block, but need to be on an allow list to use

vertex_safety(threshold: str = 'BLOCK_ONLY_HIGH')

BLOCK_ONLY_HIGH - block when high probability of unsafe content is detected BLOCK_MEDIUM_AND_ABOVE - block when medium or high probability of content is detected BLOCK_LOW_AND_ABOVE - block when low, medium, or high probability of unsafe content is detected BLOCK_NONE - no block, but need to be on an allow list to use

Sunholo Multivac

Get in touch to see if we can help with your GenAI project.

Contact us

Other Links

Sunholo Multivac - GenAIOps

Copyright ©

Holosun ApS 2024