Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full set of Home Assistant Intents Not Coming Through in Prompt #242

Open
robdoug89 opened this issue Jan 5, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@robdoug89
Copy link

Describe the bug

Using the default prompt template when setting up an "Assist LLM", only 12 tools are filled in:

Tools: [{"type":"function","function":{"name":"HassTurnOn","description":"Turns on/opens a device or entity","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"string","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassTurnOff","description":"Turns off/closes a device or entity","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"string","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassSetPosition","description":"Sets the position of a device or entity","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"string","description":""},"device_class":{"type":"list","description":""},"position":{"type":"integer","description":""}},"required":["position"]}}},{"type":"function","function":{"name":"HassCancelAllTimers","description":"Cancels all timers","parameters":{"type":"object","properties":{"area":{"type":"string","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassLightSet","description":"Sets the brightness or color of a light","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"string","description":""},"color":{"type":"string","description":""},"temperature":{"type":"integer","description":""},"brightness":{"type":"integer","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassMediaUnpause","description":"Resumes a media player","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassMediaPause","description":"Pauses a media player","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassMediaNext","description":"Skips a media player to the next item","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassMediaPrevious","description":"Replays the previous item for a media player","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""},"device_class":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassSetVolume","description":"Sets the volume of a media player","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""},"device_class":{"type":"list","description":""},"volume_level":{"type":"integer","description":""}},"required":["volume_level"]}}},{"type":"function","function":{"name":"HassVacuumStart","description":"Starts a vacuum","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""}},"required":[]}}},{"type":"function","function":{"name":"HassVacuumReturnToBase","description":"Returns a vacuum to base","parameters":{"type":"object","properties":{"name":{"type":"string","description":""},"area":{"type":"string","description":""},"floor":{"type":"string","description":""},"domain":{"type":"list","description":""}},"required":[]}}}]

However, based on the Home Assistant default intent documentation (https://developers.home-assistant.io/docs/intent_builtin/), there should be 28

Because these intents are not included, the functionality of the LLM is incomplete

Expected behavior
I'd expect all 28 default Home Assistant intents to be included in the prompt template

Looking through the source code, I think that this is the line that should be populating all intents: https://github.com/acon96/home-llm/blob/develop/custom_components/llama_conversation/conversation.py#L844

@robdoug89 robdoug89 added the bug Something isn't working label Jan 5, 2025
@allenporter
Copy link

It only exposes intents that are valid for entities you have exposed to the voice assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants