Goofle Generative AI: Fix string format (#122348)
* Ignore format for string tool args * Add tests
This commit is contained in:
parent
4eb096cb0a
commit
ac1ad9680b
2 changed files with 2 additions and 1 deletions
|
@ -81,6 +81,8 @@ def _format_schema(schema: dict[str, Any]) -> dict[str, Any]:
|
|||
key = "type_"
|
||||
val = val.upper()
|
||||
elif key == "format":
|
||||
if schema.get("type") == "string" and val != "enum":
|
||||
continue
|
||||
key = "format_"
|
||||
elif key == "items":
|
||||
val = _format_schema(val)
|
||||
|
|
|
@ -449,7 +449,6 @@
|
|||
description: "Test parameters"
|
||||
items {
|
||||
type_: STRING
|
||||
format_: "lower"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue