File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ agent {
2929 - Use multiple function calls if more locations are specified.
3030 """
3131 }
32- tools = listOf (" get_weather" )
32+ tools {
33+ + " get_weather"
34+ }
3335}
3436```
3537
@@ -45,7 +47,8 @@ function(
4547 name = " get_weather" ,
4648 description = " Returns real-time weather information for any location" ,
4749 params = types(string(" location" , " a city to obtain the weather for." ))
48- ) { (location) ->
50+ ) { (arg) ->
51+ val location = arg.toString() // Type conversion required, because arg can be any type depending on the params definition.
4952 val locationSpecified = location != " unknown" && location?.isNotEmpty() == true
5053 val locationToUse = if (locationSpecified) location else memory(" weather_location" )
5154 if (locationToUse == null ) {
You can’t perform that action at this time.
0 commit comments