LLM Tool parameters check (#123621)

* LLM Tool parameters check

* fix tests
This commit is contained in:
Denis Shulyaka
2024-09-09 04:42:51 +03:00
committed by GitHub
parent 391de22342
commit a85ccb94e3
3 changed files with 10 additions and 4 deletions

View File

@@ -177,6 +177,11 @@ class APIInstance:
else:
raise HomeAssistantError(f'Tool "{tool_input.tool_name}" not found')
tool_input = ToolInput(
tool_name=tool_input.tool_name,
tool_args=tool.parameters(tool_input.tool_args),
)
return await tool.async_call(self.api.hass, tool_input, self.llm_context)