File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ echo "[START code_execution_basic]"
4
4
# [START code_execution_basic]
5
5
curl " https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-latest:generateContent?key=$GOOGLE_API_KEY " \
6
6
-H ' Content-Type: application/json' \
7
- -d ' {"tools": ["code_execution"],
7
+ -d ' {
8
+ "tools": [{"code_execution": {}}],
8
9
"contents": {
9
- "parts":
10
- { "text": "What is the sum of the first 50 prime numbers? "
11
- "Generate and run code for the calculation, and make sure you get all 50."}
12
- }
13
- },
14
- }'
10
+ "parts": {
11
+ "text": "What is the sum of the first 50 prime numbers? Generate
12
+ and run code for the calculation, and make sure you get all 50."
13
+ }
14
+ }
15
+ }'
15
16
# [END code_execution_basic]
You can’t perform that action at this time.
0 commit comments