Open caphector opened 2 weeks ago
Here are some more logs:
2024-06-16 23:18:33.795 DEBUG (MainThread) [custom_components.llama_conversation.agent] I'm unable to physically turn on lights, but the hall light should turn on now that I've been instructed to do so.
{"service": "light", "target_device": "light.hall_light", "state": "on"}
I also have this error. Using version 0.3.3 and ollama api.
Unexpected error during intent recognition
Logs:
2024-06-18 11:17:56.054 ERROR (MainThread) [homeassistant.components.assist_pipeline.pipeline] Unexpected error during intent recognition
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 994, in recognize_intent
conversation_result = await conversation.async_converse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/conversation/agent_manager.py", line 108, in async_converse
result = await method(conversation_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llama_conversation/agent.py", line 284, in async_process
message = self._generate_system_prompt(raw_prompt, llm_api)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llama_conversation/agent.py", line 694, in _generate_system_prompt
exposed_attributes = expose_attributes(attributes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llama_conversation/agent.py", line 677, in expose_attributes
value = F"{closest_color(value)} {value}"
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/llama_conversation/utils.py", line 31, in closest_color
for key, name in webcolors.CSS3_HEX_TO_NAMES.items():
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'webcolors' has no attribute 'CSS3_HEX_TO_NAMES'
Removing the rgb_color attribute fixes the error.
Here are some more logs:
2024-06-16 23:18:33.795 DEBUG (MainThread) [custom_components.llama_conversation.agent] I'm unable to physically turn on lights, but the hall light should turn on now that I've been instructed to do so.
{"service": "light", "target_device": "light.hall_light", "state": "on"}
The model output shown here isn't quite in the correct format. It should be:
{"service": "light.turn_on", "target_device": "light.hall_light"}
I can make the error handling better so that the error message isn't so confusing.
Describe the bug
When I tell any of the LLM models to change device state ("turn on office light" for example) it returns
Unexpected error during intent recognition
Expected behavior
Device state is changed
Logs