Skip to content

Commit

Permalink
Fix quoting.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDaoust authored Jul 23, 2024
1 parent 92d021d commit 7d12737
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions samples/rest/controlled_generation.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set -eu

GOOGLE_API_KEY=AIzaSyA3Gw4E_RoF_wfergxCQ2Y7BhtkSHALxfM

echo "json_controlled_generation"
# [START json_controlled_generation]
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:generateContent?key=$GOOGLE_API_KEY" \
Expand All @@ -15,15 +13,15 @@ curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-lat
"generationConfig": {
"response_mime_type": "application/json",
"response_schema": {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'recipe_name': 'string',
},
},
},
},
"type": "ARRAY",
"items": {
"type": "OBJECT",
"properties": {
"recipe_name": {"type":"STRING"},
}
}
}
}
}' 2> /dev/null | head
# [END json_controlled_generation]

Expand All @@ -42,4 +40,4 @@ curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-lat
],
}]
}' 2> /dev/null | head
# [END json_no_schema]
# [END json_no_schema]

0 comments on commit 7d12737

Please sign in to comment.