mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +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_"
|
key = "type_"
|
||||||
val = val.upper()
|
val = val.upper()
|
||||||
elif key == "format":
|
elif key == "format":
|
||||||
|
if schema.get("type") == "string" and val != "enum":
|
||||||
|
continue
|
||||||
key = "format_"
|
key = "format_"
|
||||||
elif key == "items":
|
elif key == "items":
|
||||||
val = _format_schema(val)
|
val = _format_schema(val)
|
||||||
|
@ -449,7 +449,6 @@
|
|||||||
description: "Test parameters"
|
description: "Test parameters"
|
||||||
items {
|
items {
|
||||||
type_: STRING
|
type_: STRING
|
||||||
format_: "lower"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user