mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Goofle Generative AI: Fix string format (#122348)
* Ignore format for string tool args * Add tests
This commit is contained in:
parent
4eb096cb0a
commit
ac1ad9680b
@ -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…
x
Reference in New Issue
Block a user