Low-Level Client
Python Shield low-level client reference covering guard evaluation, detect, detector listing, debug policies, and async variants.
client.guard.evaluate()
client.guard.evaluate()from highflame import Highflame, GuardRequest
client = Highflame(api_key="hf_sk_...")
resp = client.guard.evaluate(GuardRequest(
content="What is the capital of France?",
content_type="prompt",
action="process_prompt",
))
if resp.denied:
print(f"Blocked: {resp.policy_reason}")
elif resp.alerted:
print("Alert triggered")
else:
print(f"Allowed in {resp.latency_ms}ms")GuardRequest Fields
GuardRequest FieldsField
Type
Description
GuardResponse Fields
GuardResponse FieldsField
Type
Description
client.guard.evaluate_prompt() and client.guard.evaluate_tool_call()
client.guard.evaluate_prompt() and client.guard.evaluate_tool_call()Async Variants
Sync
Async
Other Resources
client.detect.run()
client.detect.run()DetectRequest Fields
DetectRequest FieldsField
Type
Description
DetectResponse Fields
DetectResponse FieldsField
Type
Description
DetectorResult Fields
DetectorResult FieldsField
Type
Description
client.detectors.list()
client.detectors.list()client.debug.policies()
client.debug.policies()Related Topics
Last updated