Add property supported_languages to AbstractConversationAgent (#91588)

* Add property supported_languages to AbstractConversationAgent

* Fix test

* Use MATCH_ALL for openai supported languages
This commit is contained in:
Erik Montnemery
2023-04-18 22:11:04 +02:00
committed by GitHub
parent d7eb4c4740
commit dc3c47986b
8 changed files with 62 additions and 2 deletions

View File

@@ -137,3 +137,15 @@ async def test_template_error(
assert result.response.response_type == intent.IntentResponseType.ERROR, result
assert result.response.error_code == "unknown", result
async def test_conversation_agent(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_init_component,
) -> None:
"""Test OpenAIAgent."""
agent = await conversation._get_agent_manager(hass).async_get_agent(
mock_config_entry.entry_id
)
assert agent.supported_languages == ["*"]