Add script llm tool (#118936)

* Add script llm tool

* Add tests

* More tests

* more test

* more test

* Add area and floor resolving

* coverage

* coverage

* fix ColorTempSelector

* fix mypy

* fix mypy

* add script reload test

* Cache script tool parameters

* Make custom_serializer a part of api

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
This commit is contained in:
Denis Shulyaka 2024-06-25 18:43:26 +03:00 committed by GitHub
parent 77fea8a73e
commit 2386ed3830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 639 additions and 55 deletions

View file

@ -55,6 +55,8 @@ def _test_selector(
config = {selector_type: schema}
selector.validate_selector(config)
selector_instance = selector.selector(config)
assert selector_instance == selector.selector(config)
assert selector_instance != 5
# We do not allow enums in the config, as they cannot serialize
assert not any(isinstance(val, Enum) for val in selector_instance.config.values())