Skip to content

Commit

Permalink
Fix example (#494)
Browse files Browse the repository at this point in the history
Change-Id: I89d38b2fb38be407583ad1522b8b00a19efed03d
  • Loading branch information
MarkDaoust authored Jul 31, 2024
1 parent 74d67ac commit a79d2aa
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions samples/rest/code_execution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ echo "[START code_execution_basic]"
# [START code_execution_basic]
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:generateContent?key=$GOOGLE_API_KEY" \
-H 'Content-Type: application/json' \
-d ' {"tools": ["code_execution"],
-d ' {
"tools": [{"code_execution": {}}],
"contents": {
"parts":
{"text": "What is the sum of the first 50 prime numbers? "
"Generate and run code for the calculation, and make sure you get all 50."}
}
},
}'
"parts": {
"text": "What is the sum of the first 50 prime numbers? Generate
and run code for the calculation, and make sure you get all 50."
}
}
}'
# [END code_execution_basic]

0 comments on commit a79d2aa

Please sign in to comment.