mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-15 06:00:48 +00:00
update test suite to moderations.create
This commit is contained in:
parent
817cbc8a42
commit
215c8d91b8
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ def test_safe_examples_with_run_moderation(client_with_models, shield_id):
|
|||
shield = [shield for shield in client_with_models.shields.list() if shield.identifier == shield_id][0]
|
||||
model_id = shield.provider_resource_id
|
||||
for example in examples:
|
||||
moderation_object = client_with_models.safety.create(
|
||||
moderation_object = client_with_models.moderations.create(
|
||||
input=[example],
|
||||
model=model_id,
|
||||
)
|
||||
|
@ -90,7 +90,7 @@ def test_unsafe_examples_with_run_moderation(client_with_models, shield_id):
|
|||
shield = [shield for shield in client_with_models.shields.list() if shield.identifier == shield_id][0]
|
||||
model_id = shield.provider_resource_id
|
||||
for example in examples:
|
||||
moderation_object = client_with_models.safety.create(
|
||||
moderation_object = client_with_models.moderations.create(
|
||||
input=[example],
|
||||
model=model_id,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue