mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-10-06 08:16:55 +02:00
more progress on fluent service call
This commit is contained in:
1 parent
5470554d28
commit
b4b2d792fc
12 files changed
+214
-218
No files matched your search
@@ -1,13 +1,13 @@
|
||||
import pytest
|
||||
from src.text_generation.domain.guardrail_analyzed_response import GuardrailAnalyzedResponse
|
||||
from src.text_generation.domain.guardrail_processed_completion import GuardrailProcessedCompletion
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_guardrail_analyzed_response():
|
||||
response = GuardrailAnalyzedResponse(
|
||||
response = GuardrailProcessedCompletion(
|
||||
score=0.72839,
|
||||
cosine_similarity_risk_threshold=0.5,
|
||||
original="compromised response",
|
||||
original_completion="compromised response",
|
||||
final="I can't answer that"
|
||||
)
|
||||
assert response.is_completion_malicious == True
|
||||
assert response.is_original_completion_malicious == True
|
||||
Reference in new issue
Block a user