Closed MindFreeze closed 8 months ago
Thanks for reporting an issue.
I agree that area_id
(even device_id
since it can be used in target) can be used to execute service.
I used entity_id
because it's easy for user to decide whether entity should be exposed or not since HA supports exposing entities.
However, I want to keep preventing execute_services
being called without any parameters. If so, the gpt is able to call services like homeassistant.stop
or homeassistant.restart
, which we don't want.
I think it would be a good idea to let one of entity_id
, area_id
, or device_id
is required rather than only entity_id
is required.
In this way, area_id
or device_id
can be optionally exposed by modifying prompt.
I just released 1.0.1-beta1.
I have made execute_service
function to accept area_id
.
Please try this out!
https://github.com/jekalmin/extended_openai_conversation/pull/93#issue-2080328465
Tried it. Works great!
Here an error is thrown if no entity is given. However most services can be called with only
area_id
. In fact havingarea_id
is pointless ifentity_id
is required. I tried tweaking the area_id parameter like this and ChatGPT tries to use correctly but gets the exception: