mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Remove the dict wrapper from text results
This commit is contained in:
@ -50,7 +50,7 @@ class MockAITaskEntity(AITaskEntity):
|
||||
)
|
||||
return GenDataTaskResult(
|
||||
conversation_id=chat_log.conversation_id,
|
||||
data={"text": "Mock result"},
|
||||
data="Mock result",
|
||||
)
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ async def test_state_generate_data(
|
||||
entity_id=TEST_ENTITY_ID,
|
||||
instructions="Test prompt",
|
||||
)
|
||||
assert result.data["text"] == "Mock result"
|
||||
assert result.data == "Mock result"
|
||||
|
||||
entity = hass.states.get(TEST_ENTITY_ID)
|
||||
assert entity.state == "2025-06-08T16:28:13+00:00"
|
||||
|
@ -81,4 +81,4 @@ async def test_generate_data_service(
|
||||
return_response=True,
|
||||
)
|
||||
|
||||
assert result["data"]["text"] == "Mock result"
|
||||
assert result["data"] == "Mock result"
|
||||
|
@ -70,7 +70,7 @@ async def test_run_task_preferred_entity(
|
||||
task_name="Test Task",
|
||||
instructions="Test prompt",
|
||||
)
|
||||
assert result.data["text"] == "Mock result"
|
||||
assert result.data == "Mock result"
|
||||
state = hass.states.get(TEST_ENTITY_ID)
|
||||
assert state is not None
|
||||
assert state.state != STATE_UNKNOWN
|
||||
@ -117,7 +117,7 @@ async def test_run_data_task_updates_chat_log(
|
||||
entity_id=TEST_ENTITY_ID,
|
||||
instructions="Test prompt",
|
||||
)
|
||||
assert result.data["text"] == "Mock result"
|
||||
assert result.data == "Mock result"
|
||||
|
||||
with (
|
||||
chat_session.async_get_chat_session(hass, result.conversation_id) as session,
|
||||
|
Reference in New Issue
Block a user