-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
failure-finish-reason-safety
with Vertex responses (#21)
- Loading branch information
1 parent
510e9f6
commit fa4ce87
Showing
3 changed files
with
64 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
data: {"candidates": [{"content": {"parts": [{"text": "<redacted>"}],"role": "model"},"finishReason": "SAFETY","index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "HIGH"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}],"promptFeedback": {"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}} | ||
data: {"candidates": [{"content": {"parts": [{"text": "<redacted>"}],"role": "model"},"finishReason": "SAFETY","safetyRatings": [{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE","probabilityScore": 0.40429688,"severity": "HARM_SEVERITY_NEGLIGIBLE","severityScore": 0.18554688},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE","probabilityScore": 0.15820313,"severity": "HARM_SEVERITY_NEGLIGIBLE","severityScore": 0.030639648},{"category": "HARM_CATEGORY_HARASSMENT","probability": "LOW","blocked": true,"probabilityScore": 0.55078125,"severity": "HARM_SEVERITY_LOW","severityScore": 0.24804688},{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE","probabilityScore": 0.17675781,"severity": "HARM_SEVERITY_NEGLIGIBLE","severityScore": 0.17871094}]}],"usageMetadata": {"promptTokenCount": 10,"candidatesTokenCount": 66,"totalTokenCount": 76},"modelVersion": "gemini-1.5-flash"} | ||
|
79 changes: 38 additions & 41 deletions
79
mock-responses/unary-failure-finish-reason-safety-no-content.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,43 @@ | ||
{ | ||
"candidates": [ | ||
"candidates": [ | ||
{ | ||
"finishReason": "SAFETY", | ||
"safetyRatings": [ | ||
{ | ||
"finishReason": "SAFETY", | ||
"index": 0, | ||
"safetyRatings": [ | ||
{ | ||
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", | ||
"probability": "NEGLIGIBLE" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_HATE_SPEECH", | ||
"probability": "HIGH" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_HARASSMENT", | ||
"probability": "NEGLIGIBLE" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_DANGEROUS_CONTENT", | ||
"probability": "NEGLIGIBLE" | ||
} | ||
] | ||
"category": "HARM_CATEGORY_HATE_SPEECH", | ||
"probability": "NEGLIGIBLE", | ||
"probabilityScore": 0.3984375, | ||
"severity": "HARM_SEVERITY_LOW", | ||
"severityScore": 0.21582031 | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_DANGEROUS_CONTENT", | ||
"probability": "NEGLIGIBLE", | ||
"probabilityScore": 0.14941406, | ||
"severity": "HARM_SEVERITY_NEGLIGIBLE", | ||
"severityScore": 0.02331543 | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_HARASSMENT", | ||
"probability": "LOW", | ||
"blocked": true, | ||
"probabilityScore": 0.61328125, | ||
"severity": "HARM_SEVERITY_LOW", | ||
"severityScore": 0.31835938 | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", | ||
"probability": "NEGLIGIBLE", | ||
"probabilityScore": 0.13476563, | ||
"severity": "HARM_SEVERITY_NEGLIGIBLE", | ||
"severityScore": 0.12109375 | ||
} | ||
], | ||
"promptFeedback": { | ||
"safetyRatings": [ | ||
{ | ||
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", | ||
"probability": "NEGLIGIBLE" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_HATE_SPEECH", | ||
"probability": "NEGLIGIBLE" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_HARASSMENT", | ||
"probability": "NEGLIGIBLE" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_DANGEROUS_CONTENT", | ||
"probability": "NEGLIGIBLE" | ||
} | ||
] | ||
] | ||
} | ||
], | ||
"usageMetadata": { | ||
"promptTokenCount": 8, | ||
"totalTokenCount": 8 | ||
}, | ||
"modelVersion": "gemini-1.5-flash" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters