Commit Graph

54 Commits (b3b5ca9b9592f2df4ff5e2b740cb5c2b52cd2498)

Author SHA1 Message Date
Michael Hansen 7e3fdd85fc
Add wildcards to sentence triggers (#97236)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-27 20:30:42 +02:00
Franck Nijhof f2bd122fde
Clean up conversation agent attribution (#96883)
* Clean up conversation agent attribution

* Clean up google_generative_ai_conversation as well
2023-07-19 09:03:53 +02:00
Michael Hansen 487dd3f956
Add targeted entities to sentence debug API (#95480)
* Return targets with debug sentence API

* Update test

* Update homeassistant/components/conversation/__init__.py

* Include area/domain in test sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-28 18:34:43 -04:00
Paulus Schoutsen d6cd5648b9
Change conversation default agent behavior (#95225)
* Change conversation default agent behavior

* Fix tests
2023-06-26 22:10:17 -04:00
Paulus Schoutsen 3f10233833
Add return value to conversation.process service (#94740)
* Add return value to conversation.process service

* Adjust for new API
2023-06-23 13:32:03 -04:00
Michael Hansen 38614bc3f0
Add websocket command to test intent recognition for default agent (#94674)
* Add websocket command to test intent recognition for default agent

* Return results as a list

* Only check intent name/entities in test

* Less verbose output in debug API
2023-06-22 12:24:59 -04:00
Paulus Schoutsen cd330a2740
Pass device ID to conversation input (#93867) 2023-05-31 16:56:12 -04:00
Erik Montnemery 4860a8d1e8
Don't use storage collection helper in ExposedEntities (#92396)
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery e3c16e634b
Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
Erik Montnemery ebd9cd096a
Keep expose setting in sync for assist (#92158)
* Keep expose setting in sync for assist

* Fix initialization, add test

* Fix tests

* Add AgentManager.async_setup

* Fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-04-28 15:59:21 +02:00
Erik Montnemery 18f7b92438
Fall back to domain for conversation agents without title (#92014) 2023-04-25 22:14:44 +02:00
Erik Montnemery b601fb17d3
Create a default assist pipeline on start (#91947)
* Create a default assist pipeline on start

* Minor adjustments

* Address review comments

* Remove tts.async_get_agent

* Fix bugs, improve test coverage
2023-04-24 14:00:52 -04:00
Paulus Schoutsen d4fb2cdcf7
Conversation list command to support match-all languages agents (#91844)
* Conversation list command to support match-all languages agnets

* Reuse var
2023-04-22 12:43:09 -04:00
Erik Montnemery 0429b321b8
Include matching languages in WS conversation/agent/list (#91730)
* Include matching languages in WS conversation/agent/list

* Allow specifying country
2023-04-20 08:58:43 -04:00
Erik Montnemery 6d619579b4
Add WS API for listing languages supported by a full assist pipeline (#91669)
* Add WS API for listing languages supported by a full assist pipeline

* Address review comments, change logic
2023-04-20 08:55:17 -04:00
Erik Montnemery 5e9bbeb4ad
Refactor conversation agent WS API for listing agents (#91590)
* Refactor conversation agent WS API for listing agents

* Add conversation/agent/info back
2023-04-19 10:53:24 -04:00
Erik Montnemery 5f7d98f15b
Improve comment in conversation (#91595) 2023-04-18 09:27:14 -04:00
Paulus Schoutsen c9d81bd217
Pipelines to default to Home Assistant agent (#91321)
* Pipelines to default to Home Assistant agent

* Tests fix
2023-04-13 00:34:19 -04:00
Paulus Schoutsen ad26317b75
Conversation: allow getting agent info (#90540)
* Conversation: allow getting agent info

* Add unset agenet back
2023-03-31 14:36:39 -04:00
Paulus Schoutsen fc38b4327f
Add support for multiple conversation agents (#87337)
* Add support for multiple conversation agents

* Lock initializing default agent

* Allow unsetting agent when never set
2023-02-03 23:35:29 -05:00
Paulus Schoutsen 6c8efe3a3b
Conversation cleanup (#86592)
* Require config entry when setting Conversation agent, add new unset agent method

* Remove onboarding from conversation agent

* Type attribution

* Wrap async_process params in ConversationInput object
2023-01-24 21:47:49 -06:00
Michael Hansen ea95abcb30
Use intent responses from home-assistant-intents (#86484)
* Use intent responses from home_assistant_intents

* Use error responses from home_assistant_intents

* Remove speech checks for intent tests (set by conversation now)

* Bump hassil and home-assistant-intents versions

* Use Home Assistant JSON reader when loading intents

* Remove speech checks for light tests (done in agent)

* Add more tests for code coverage

* Add test for reloading on new component

* Add test for non-default response
2023-01-23 22:38:41 -05:00
Michael Hansen 255611238b
Conversation config (#86326)
* Restore conversation config

* Fall back to en for en_US, etc.

* Simplify config passing around

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-20 21:39:49 -05:00
Michael Hansen 5aca996f22
HassTurnOn/Off intents to also handle cover entities (#86206)
* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Fix humidifier intent handlers

* Remove DATA_CONFIG for conversation

* Copy ServiceIntentHandler code to light

* Add proper errors to humidifier intent handlers
2023-01-19 17:15:01 -06:00
Paulus Schoutsen 9631146745
Add conversation mobile app webhook (#86239)
* Add conversation mobile app webhook

* Re-instate removed unused import which was used as fixture
2023-01-19 13:59:02 -05:00
Michael Hansen 2f98485ae7
Add conversation reload service (#86175)
* Add preload and reload service calls to conversation

* Add conversation preload/reload to websocket API

* Merge prepare into reload

* reload service and prepare websocket API

* Add preload and reload service calls to conversation

* Add conversation preload/reload to websocket API

* Merge prepare into reload

* reload service and prepare websocket API

* Add language lock for loading intents

* Add more tests for code coverage
2023-01-18 19:36:51 -06:00
Paulus Schoutsen 96533e4c8f
Test conversation WS API (#84466) 2022-12-22 20:19:37 -05:00
Michael Hansen 961c8cc167
Update intent response (#83858)
* Add language to conversation and intent response

* Move language to intent response instead of speech

* Extend intent response for voice MVP

* Add tests for error conditions in conversation/process

* Move intent response type data into "data" field

* Move intent response error message back to speech

* Remove "success" from intent response

* Add id to target in intent response

* target defaults to None

* Update homeassistant/helpers/intent.py

* Fix test

* Return conversation_id and multiple targets

* Clean up git mess

* Fix linting errors

* Fix more async_handle signatures

* Separate conversation_id and IntentResponse

* Add unknown error code

* Add ConversationResult

* Don't set domain on single entity

* Language is required for intent response

* Add partial_action_done

* Default language in almond agent

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-12-13 16:46:40 -06:00
Michael Hansen e71eb8dfe2
Update intent response (#83560)
* Add language to conversation and intent response

* Move language to intent response instead of speech

* Extend intent response for voice MVP

* Add tests for error conditions in conversation/process

* Move intent response type data into "data" field

* Move intent response error message back to speech

* Remove "success" from intent response

* Add id to target in intent response

* target defaults to None

* Update homeassistant/helpers/intent.py

* Fix test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-12-08 20:30:08 -05:00
Michael Hansen ac87528bec
Add language to conversation and intent response (#83486)
* Add language to conversation and intent response

* Add language parameter to conversation/process service

* Move language to intent response instead of speech

* Add language to almond conversation agent

* Fix intent test
2022-12-08 11:39:28 -05:00
epenet eca45f9dd0
Add websocket type hints in conversation (#80535) 2022-10-18 22:08:06 -04:00
epenet 7e0515b119
Remove conversation from mypy ignore list (#74991) 2022-07-11 17:47:33 +02:00
Erik Montnemery 3b7448bb1c
Import websocket_api (part 2) (#63906) 2022-01-11 17:26:25 +01:00
epenet 8fcca8c88b
Allow None agent in conversation (#63761) 2022-01-10 17:02:54 +01:00
epenet 9e16f87ddc
Add init type hints [b-c] (#63100)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 17:05:18 +01:00
epenet de64622f3b
Ensure service calls are typed [a-d] (#62891)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-28 00:14:20 +01:00
Marc Mueller f149bef9f3
Use assignment expressions 18 (#57967) 2021-10-18 18:36:35 +02:00
Ville Skyttä d8d34fdd3b
Prefer HTTPStatus over int in HA view JSON functions (#56504)
* Prefer HTTPStatus over int in HA view JSON functions

* Update zwave tests to not expect a fixed typo
2021-09-22 21:59:52 +03:00
Ville Skyttä 1bf2c4d976
Upgrade pylint to 2.6.0 (#39363) 2020-08-29 07:59:24 +02:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Paulus Schoutsen 111050bea9
Clean up core services (#31509)
* Clean up core services

* Fix conversation test
2020-02-08 13:10:59 +01:00
Bas Nijholt 080c702d4f Sort imports according to PEP8 for components starting with "C" (#29763) 2019-12-09 18:56:21 +01:00
Paulus Schoutsen 004476a1f8 Add intent integration to expose intent handle API (#29124)
* Add intent integration to expose intent handle API.

* Run hassfest + fix scaffolding

* Update __init__.py
2019-11-27 11:25:43 +01:00
Paulus Schoutsen c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Michael Hansen c2161b1f5a Add HTTP view to conversation to handle intents via JSON POST (#28818) 2019-11-19 13:47:03 -06:00
Bram Kragten 28c6837f00 Add attribution and onboarding commands to conversation and Almond (#28621)
* Add attribution and onboarding commands to conversation and Almond

* False -> None

* Comments

* Update __init__.py

* Comments + websocket for convert

* Lint
2019-11-08 09:06:23 -08:00
Paulus Schoutsen fadb6a3979
Add support for conversation ID (#28620) 2019-11-07 12:21:12 -08:00
Paulus Schoutsen a119932ee5
Refactor the conversation integration (#27839)
* Refactor the conversation integration

* Lint
2019-10-18 11:46:45 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00