8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74a331f commit 55cb36eCopy full SHA for 55cb36e
src/google/adk/tools/function_parameter_parse_util.py
@@ -289,6 +289,13 @@ def _parse_schema_from_parameter(
289
)
290
_raise_if_schema_unsupported(variant, schema)
291
return schema
292
+ if param.annotation is None:
293
+ # https://swagger.io/docs/specification/v3_0/data-models/data-types/#null
294
+ # null is not a valid type in schema, use object instead.
295
+ schema.type = types.Type.OBJECT
296
+ schema.nullable = True
297
+ _raise_if_schema_unsupported(variant, schema)
298
+ return schema
299
raise ValueError(
300
f'Failed to parse the parameter {param} of function {func_name} for'
301
' automatic function calling. Automatic function calling works best with'
0 commit comments