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

@@ -7,6 +7,7 @@ from unittest.mock import call, patch
import aiohttp
import pytest
from homeassistant.components import conversation
from homeassistant.components.google_assistant_sdk import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
@@ -334,6 +335,9 @@ async def test_conversation_agent(
)
await hass.async_block_till_done()
agent = await conversation._get_agent_manager(hass).async_get_agent(entry.entry_id)
assert agent.supported_languages == ["en-US"]
text1 = "tell me a joke"
text2 = "tell me another one"
with patch(