epenet and Paulus Schoutsen
b459559c8b
Add ability to replace connections in DeviceRegistry ( #118555 )
...
* Add ability to replace connections in DeviceRegistry
* Add more tests
* Improve coverage
* Apply suggestion
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io >
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io >
2024-05-31 19:34:38 +00:00
Paulus Schoutsen
17cb25a5b6
Rename llm.ToolContext to llm.LLMContext ( #118566 )
2024-05-31 19:32:07 +00:00
tronikos
7dab255c15
Fix unnecessary single quotes escaping in Google AI ( #118522 )
2024-05-31 02:19:58 +00:00
tronikos
cea7347ed9
Improve LLM prompt ( #118520 )
2024-05-31 02:19:56 +00:00
tronikos
f4a876c590
Fix LLMs asking which area when there is only one device ( #118518 )
...
* Ignore deprecated open and close cover intents for LLMs
* Fix LLMs asking which area when there is only one device
* remove unrelated changed
* remove unrelated changes
2024-05-31 02:19:55 +00:00
tronikos
117a02972d
Ignore deprecated open and close cover intents for LLMs ( #118515 )
2024-05-31 02:19:54 +00:00
Paulus Schoutsen
eb887a707c
Ignore the toggle intent ( #118491 )
2024-05-31 02:19:46 +00:00
tronikos
48342837c0
Instruct LLM to not pass a list to the domain ( #118451 )
2024-05-30 17:02:00 +02:00
tronikos
3e0d9516a9
Improve LLM prompt ( #118443 )
...
* Improve LLM prompt
* test
* improvements
* improvements
2024-05-30 17:01:55 +02:00
tronikos
4056c4c2cc
Ask LLM to pass area name and domain ( #118357 )
2024-05-29 08:03:43 -04:00
tronikos
c75cb08aae
Fix LLM tracing for Google Generative AI ( #118359 )
...
Fix LLM tracing for Gemini
2024-05-29 08:02:59 -04:00
tronikos
b7ee90a53c
Expose useful media player attributes to LLMs ( #118363 )
2024-05-29 08:01:40 -04:00
Erik Montnemery
7abffd7cc8
Don't report entities with invalid unique id when loading the entity registry ( #118290 )
2024-05-29 08:32:39 +02:00
J. Nick Koston
f3fa843b9d
Replace pop calls with del where the result is discarded in restore_state ( #118339 )
2024-05-28 23:14:40 -04:00
J. Nick Koston
b94bf1f214
Add cache to more complex entity filters ( #118344 )
...
Many of these do regexes and since the entity_ids are almost
always the same we should cache these
2024-05-28 23:07:50 -04:00
Paulus Schoutsen
d22871f1fd
Reduce the intent response data sent to LLMs ( #118346 )
...
* Reduce the intent response data sent to LLMs
* No longer delete speech
2024-05-28 23:07:00 -04:00
J. Nick Koston
fa9ebb062c
Small speed up to connecting dispatchers ( #118342 )
2024-05-28 16:49:58 -10:00
Paulus Schoutsen
c097a05ed4
Tweak Assist LLM API prompt ( #118343 )
2024-05-28 22:43:22 -04:00
Michael Hansen and Paulus Schoutsen
d223e1f2ac
Add Conversation command to timers ( #118325 )
...
* Add Assist command to timers
* Rename to conversation_command. Execute in timer code.
* Make agent_id optional
* Fix arg
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com >
2024-05-28 20:33:31 -05:00
Paulus Schoutsen
615a1eda51
LLM Assist API to ignore intents if not needed for exposed entities or calling device ( #118283 )
...
* LLM Assist API to ignore timer intents if device doesn't support it
* Refactor to use API instances
* Extract ToolContext class
* Limit exposed intents based on exposed entities
2024-05-28 21:29:18 -04:00
J. Nick Koston
e0264c8604
Replace pop calls with del where the result is discarded in entity ( #118340 )
2024-05-28 15:26:53 -10:00
J. Nick Koston
fd9d4dbb34
Use del instead of pop in the entity platform remove ( #118337 )
2024-05-28 15:26:22 -10:00
Michael Hansen
2dc49f0410
Add platforms to intent handlers ( #118328 )
2024-05-28 16:46:08 -04:00
Paulus Schoutsen
f0d7f48930
Handle generic commands as area commands in the LLM Assist API ( #118276 )
...
* Handle generic commands as area commands in the LLM Assist API
* Add word area
2024-05-28 11:21:17 -04:00
Paulus Schoutsen
6f248acfd5
LLM Assist API: Inline all exposed entities ( #118273 )
...
Inline all exposed entities
2024-05-27 21:12:10 -04:00
J. Nick Koston
33ff84469a
Align max expected entities constant between modules ( #118102 )
2024-05-27 14:06:16 -10:00
J. Nick Koston
87989a88cd
Remove translation and icon component path functions ( #118214 )
...
These functions have been stripped down to always return
the same path so there was no longer a need to have a
function for this. This is left-over cleanup from
previous refactoring.
2024-05-27 10:35:52 +02:00
Paulus Schoutsen
ecb05989ca
Add exposed entities to the Assist LLM API prompt ( #118203 )
...
* Add exposed entities to the Assist LLM API prompt
* Check expose entities in Google test
* Copy Google default prompt test cases to LLM tests
2024-05-27 00:27:08 -04:00
Paulus Schoutsen
1602c8063c
Standardize LLM instructions prompt ( #118195 )
...
* Standardize instructions prompt
* Add time/date to default instructions
2024-05-26 20:24:26 -04:00
J. Nick Koston
c368ffffd5
Add async_get_hass_or_none ( #118164 )
2024-05-26 13:38:46 +02:00
Paulus Schoutsen
233c3bb2be
Add render prompt method when no API selected ( #118136 )
2024-05-26 13:35:15 +02:00
J. Nick Koston
607aaa0efe
Speed up template result parsing ( #118168 )
2024-05-26 13:09:12 +02:00
J. Nick Koston
7bbb33b415
Improve script disallowed recursion logging ( #118151 )
2024-05-26 12:58:34 +02:00
Denis Shulyaka and Paulus Schoutsen
cee3be5f7a
Break long strings in LLM tools ( #118114 )
...
* Break long code strings
* Address comments
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com >
2024-05-25 14:24:51 -04:00
Allen Porter
89e2c57da6
Add conversation agent debug tracing ( #118124 )
...
* Add debug tracing for conversation agents
* Minor cleanup
2024-05-25 14:16:51 -04:00
J. Nick Koston
42232ecc8a
Remove unused code in template helper ( #118075 )
2024-05-24 17:44:24 -10:00
J. Nick Koston
6923fb1601
Avoid template context manager overhead when template is already compiled ( #118079 )
2024-05-24 17:44:02 -10:00
J. Nick Koston
5cb3bc19c0
Speed up async_render_with_possible_json_value ( #118080 )
2024-05-24 17:43:42 -10:00
J. Nick Koston
3416162fdb
Remove OrderedDict from entity_values as dict guarantees order on newer cpython ( #118081 )
2024-05-24 17:43:20 -10:00
J. Nick Koston
f026083712
Speed up is_template_string by avoiding regex engine ( #118076 )
2024-05-24 17:42:55 -10:00
Denis Shulyaka
da74ac06d7
Add user name and location to the LLM assist prompt ( #118071 )
...
Add user name and location to the llm assist prompt
2024-05-24 22:23:05 -04:00
J. Nick Koston
cf73a47fc0
Significantly speed up single use callback dispatchers ( #117934 )
2024-05-24 11:21:10 -10:00
Paulus Schoutsen
7554ca9460
Allow llm API to render dynamic template prompt ( #118055 )
...
* Allow llm API to render dynamic template prompt
* Make rendering api prompt async so it can become a RAG
* Fix test
2024-05-24 16:04:48 -04:00
J. Nick Koston
a8fba691ee
Add types to event tracker data ( #118010 )
...
* Add types to event tracker data
* fixes
* do not test event internals in other tests
* fixes
* Update homeassistant/helpers/event.py
* cleanup
* cleanup
2024-05-24 10:09:39 -04:00
Marc Mueller
dd22ee3dac
Improve annotation styling ( #118032 )
2024-05-24 15:05:53 +02:00
Marc Mueller
905adb2431
Update codespell ignore list ( #118018 )
2024-05-24 10:24:34 +02:00
Marc Mueller
0e03e591e7
Improve callable annotations ( #118024 )
2024-05-24 10:24:09 +02:00
J. Nick Koston
b7a18e9a8f
Avoid calling split_entity_id in event add/remove filters ( #118015 )
2024-05-24 10:01:33 +02:00
Franck Nijhof and Robert Resch
9224997411
Add sequence action for automations & scripts ( #117690 )
...
Co-authored-by: Robert Resch <robert@resch.dev >
2024-05-24 09:34:49 +02:00
J. Nick Koston
6c6a5f496a
Simplify async_track_time_interval implementation ( #117956 )
2024-05-22 21:56:49 -10:00