-
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.
Add sample responses from Imagen API
- Loading branch information
1 parent
bb55b27
commit 5506bce
Showing
6 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
mock-responses/imagen/unary-failure-generate-images-all-filtered.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,7 @@ | ||
{ | ||
"predictions": [ | ||
{ | ||
"raiFilteredReason": "Unable to show generated images. All images were filtered out because they violated Vertex AI's usage guidelines. You will not be charged for blocked images. Try rephrasing the prompt. If you think this was an error, send feedback. Support codes: 39322892, 29310472" | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
mock-responses/imagen/unary-failure-generate-images-base64-some-filtered.json
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
mock-responses/imagen/unary-failure-generate-images-gcs-some-filtered.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,15 @@ | ||
{ | ||
"predictions": [ | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_0.jpg" | ||
}, | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_1.jpg" | ||
}, | ||
{ | ||
"raiFilteredReason": "Your current safety filter threshold filtered out 2 generated images. You will not be charged for blocked images. Try rephrasing the prompt. If you think this was an error, send feedback." | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
mock-responses/imagen/unary-failure-generate-images-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,7 @@ | ||
{ | ||
"error": { | ||
"code": 400, | ||
"message": "Image generation failed with the following error: The prompt could not be submitted. This prompt contains sensitive words that violate Google's Responsible AI practices. Try rephrasing the prompt. If you think this was an error, send feedback. Support codes: 42876398", | ||
"status": "INVALID_ARGUMENT" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
mock-responses/imagen/unary-success-generate-images-base64.json
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
mock-responses/imagen/unary-success-generate-images-gcs.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,20 @@ | ||
{ | ||
"predictions": [ | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_0.jpg" | ||
}, | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_1.jpg" | ||
}, | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_2.jpg" | ||
}, | ||
{ | ||
"mimeType": "image/jpeg", | ||
"gcsUri": "gs://test-project-id-1234.firebasestorage.app/images/1234567890123/sample_3.jpg" | ||
} | ||
] | ||
} |