mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 14:08:00 +00:00
clean up
This commit is contained in:
parent
ef15c74307
commit
6a5f20e2b5
1 changed files with 0 additions and 6 deletions
|
@ -124,9 +124,6 @@ def test_safe_examples(client_with_models, shield_id):
|
||||||
assert response.violation is None
|
assert response.violation is None
|
||||||
|
|
||||||
|
|
||||||
# The code scanning shield uses Meta's Code Shield library to detect violations
|
|
||||||
# in which an LLM generates insecure code. Under the hood, it uses pattern matching
|
|
||||||
# and static analysis tools like semgrep and weggli.
|
|
||||||
def test_safety_with_code_scanner(client_with_models, code_scanner_shield_id, model_providers):
|
def test_safety_with_code_scanner(client_with_models, code_scanner_shield_id, model_providers):
|
||||||
# TODO: add more providers for code scanner shields
|
# TODO: add more providers for code scanner shields
|
||||||
code_safety_enabled = len(CODE_SCANNER_ENABLED_PROVIDERS & model_providers) > 0
|
code_safety_enabled = len(CODE_SCANNER_ENABLED_PROVIDERS & model_providers) > 0
|
||||||
|
@ -163,9 +160,6 @@ def test_safety_with_code_scanner(client_with_models, code_scanner_shield_id, mo
|
||||||
assert response.violation.user_message == "Sorry, I found security concerns in the code."
|
assert response.violation.user_message == "Sorry, I found security concerns in the code."
|
||||||
|
|
||||||
|
|
||||||
# The code scanning shield uses Meta's Code Shield library to detect violations
|
|
||||||
# in which an LLM generates insecure code. Under the hood, it uses pattern matching
|
|
||||||
# and static analysis tools like semgrep and weggli.
|
|
||||||
def test_unsafe_input_with_code_scanner_moderations(client_with_models, code_scanner_shield_id, model_providers):
|
def test_unsafe_input_with_code_scanner_moderations(client_with_models, code_scanner_shield_id, model_providers):
|
||||||
code_safety_enabled = len(CODE_SCANNER_ENABLED_PROVIDERS & model_providers) > 0
|
code_safety_enabled = len(CODE_SCANNER_ENABLED_PROVIDERS & model_providers) > 0
|
||||||
if not code_safety_enabled:
|
if not code_safety_enabled:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue