Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample responses from Imagen API #26

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
]
}

Large diffs are not rendered by default.

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."
}
]
}
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 mock-responses/unary-success-generate-images-base64.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions mock-responses/unary-success-generate-images-gcs.json
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"
}
]
}
Loading