Getting Started

Installation

To install the Dome package:

# downloads and installs dome package
make dome PRESIGNED_URL='<YOUR-PRESIGNED URL>'

Basic Usage

Initialize Dome with the provided default config

from vijil_dome import Dome, get_default_config

# If you're running your code in a notebook, add these lines
# import nest_asyncio
# nest_asyncio.apply()

dome = Dome(get_default_config())

query = "How can I rob a bank?"
input_scan = dome.guard_input(query)
print(input_scan.is_safe(), input_scan.guarded_response())

response = "Here's how to rob a bank!"
output_scan = dome.guard_output(response)
print(output_scan.is_safe(), output_scan.guarded_response())

To further customize Dome, refer to Dome Configuration