#Make llm use real area IDs for custome script

1 messages · Page 1 of 1 (latest)

prime iron
#

I made a script that needs a area id as parameter. From the debug i can see that it wants to do the right thing but it uses a not valid area id. For example it tries to use area_id: Wohnzimmer Unten, which is invalid. A valid one would be area_id: wohnzimmer_unten

So what to do to make the LLM use valid IDs? Maybe a different description of the argument?

#

Here is the interesting part of my script:

fields:
  destination:
    selector:
      target: {}
    name: Destination
    description: Where to speak
    required: true
#

Make llm use real area IDs for custome script

daring pawn
#

Not sure what your script is trying to do so hard to offer pointers 😅

carmine comet
#

There's area_id(area_name) template to switch

prime iron
prime iron
carmine comet
# prime iron ???

I mean to convert area name like "Bedroom" to area ID in your scripts or automations, you can use function area_id("Bedroom").

prime iron
carmine comet
#

No, but your LLM should switch your "similar" response into exact area name.
Also that function works with aliases, so you can add aliases like "lower bedroom" or "main bedroom" or "cave", and it all will work

prime iron
#

I just figured it out. I just told it in the argument description to use id instead of name XD. But now i have the problem that when using LLM via companion app, it does not have a source device....

prime iron
#

Now it doesn't work again. Now it just asks me for the IDs....

#

I need a better description prompt for it

carmine comet
#

That's why I prefer writing scripts my own, even if they're called by LLM. Then I can hide complicated logic from that silicon dumbass.

carmine comet
prime iron
#

What text need to be included into the argument description?

carmine comet
#

I mean, don't ask it using ID. Convert area name into ID in your script.

prime iron
#

But the area names are wrong

#

And i need area, entity or device

prime iron
carmine comet
prime iron
carmine comet