-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for unknown enum values in responses (#60)
1 parent
ea39d69
commit a9f807d
Showing
5 changed files
with
170 additions
and
58 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
Tests/GoogleAITests/GenerateContentResponses/unary-failure-unknown-enum-finish-reason.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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"candidates": [ | ||
{ | ||
"content": { | ||
"parts": [ | ||
{ | ||
"text": "Some text" | ||
} | ||
] | ||
}, | ||
"finishReason": "FAKE_NEW_FINISH_REASON", | ||
"index": 0, | ||
"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" | ||
} | ||
] | ||
} | ||
], | ||
"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" | ||
} | ||
] | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Tests/GoogleAITests/GenerateContentResponses/unary-failure-unknown-enum-prompt-blocked.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"promptFeedback": { | ||
"blockReason": "FAKE_NEW_BLOCK_REASON", | ||
"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" | ||
} | ||
] | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Tests/GoogleAITests/GenerateContentResponses/unary-success-unknown-enum-safety-ratings.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"candidates": [ | ||
{ | ||
"content": { | ||
"parts": [ | ||
{ | ||
"text": "Some text" | ||
} | ||
], | ||
"role": "model" | ||
}, | ||
"finishReason": "STOP", | ||
"index": 0, | ||
"safetyRatings": [ | ||
{ | ||
"category": "HARM_CATEGORY_HARASSMENT", | ||
"probability": "MEDIUM" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_DANGEROUS_CONTENT", | ||
"probability": "FAKE_NEW_HARM_PROBABILITY" | ||
}, | ||
{ | ||
"category": "FAKE_NEW_HARM_CATEGORY", | ||
"probability": "HIGH" | ||
} | ||
] | ||
} | ||
], | ||
"promptFeedback": { | ||
"safetyRatings": [ | ||
{ | ||
"category": "HARM_CATEGORY_HARASSMENT", | ||
"probability": "MEDIUM" | ||
}, | ||
{ | ||
"category": "HARM_CATEGORY_DANGEROUS_CONTENT", | ||
"probability": "FAKE_NEW_HARM_PROBABILITY" | ||
}, | ||
{ | ||
"category": "FAKE_NEW_HARM_CATEGORY", | ||
"probability": "HIGH" | ||
} | ||
] | ||
} | ||
} |
52 changes: 0 additions & 52 deletions
52
Tests/GoogleAITests/GenerateContentResponses/unary-success-unknown-enum.json
This file was deleted.
Oops, something went wrong.
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