payload
payload
parameter is a dictionary containing the data you want to inspect and filter. It typically includes:
input
: The original input data from the user.output
: The generated output data from your system.rulesets
rulesets
parameter is a list of RuleSet
objects defining the rules your application must comply with. Each RuleSet
contains:
rules
: A list of individual rules to check against the payload
.
metric
: The type of content to evaluate (e.g., “pii” for Personally Identifiable Information).operator
: The condition to apply (e.g., “contains”).value
: Specific values to look for (e.g., [“email”, “ssn”]).action
: The action to take if a rule is triggered.
type
: The type of action (e.g., “OVERRIDE”).fallback
: The fallback response if the action type is “OVERRIDE”.config
murnitur_key
, provider
, model
, group
, api_key
, base_url
, and headers
.
Example:
murnitur_key
murnitur_key
is a required string containing your Murnitur API key. This key authenticates your requests, captures interceptions, and links them to your account. If not passed, murnitur picks it up from the environment variables.
provider
provider
parameter specifies the service provider you are using, such as “openai”, “groq”, “anthropic”, or “custom”.
Example:
model
gpt-3.5-turbo
, but you can change it to any supported model from your chosen provider.
Example:
group
group
parameter is an optional string that categorizes the set of rules being applied. It helps in organizing and managing different rule sets for various environments or projects.
Example:
api_key
api_key
is an optional string containing your API key for the chosen provider. This key is required if you use any provider-specific metrics in your rule sets.
Example:
base_url
base_url
is an optional string specifying the base URL for API requests. This is useful if you need to point to a different endpoint. It must be an OpenAI compatible API endpoint.
Example:
headers
headers
parameter is an optional dictionary containing any additional headers you need to include in your API requests.
Example: