Skip to content

Commit fc73c57

Browse files
committed
Fix function_calling.sh example
1 parent 8849d4f commit fc73c57

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

samples/rest/function_calling.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ cat > tools.json << EOF
88
"function_declarations": [
99
{
1010
"name": "enable_lights",
11-
"description": "Turn on the lighting system.",
12-
"parameters": { "type": "object" }
11+
"description": "Turn on the lighting system."
1312
},
1413
{
1514
"name": "set_light_color",
@@ -29,8 +28,7 @@ cat > tools.json << EOF
2928
},
3029
{
3130
"name": "stop_lights",
32-
"description": "Turn off the lighting system.",
33-
"parameters": { "type": "object" }
31+
"description": "Turn off the lighting system."
3432
}
3533
]
3634
}
@@ -45,10 +43,10 @@ curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro-lat
4543
"text": "You are a helpful lighting system bot. You can turn lights on and off, and you can set the color. Do not perform any other tasks."
4644
}
4745
},
48-
"tools": ['$(source "$tools")'],
46+
"tools": ['$(cat tools.json)'],
4947
5048
"tool_config": {
51-
"function_calling_config": {"mode": "none"}
49+
"function_calling_config": {"mode": "auto"}
5250
},
5351
5452
"contents": {

0 commit comments

Comments
 (0)