mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Make openai conversation prompt template more readable + test case (#86676)
This commit is contained in:
parent
021ac84405
commit
ff91fb7d74
@ -50,6 +50,17 @@ async def test_default_prompt(hass, mock_init_component):
|
||||
model="Test Model 3A",
|
||||
suggested_area="Test Area 2",
|
||||
)
|
||||
device = device_reg.async_get_or_create(
|
||||
config_entry_id="1234",
|
||||
connections={("test", "9876-disabled")},
|
||||
name="Test Device 3",
|
||||
manufacturer="Test Manufacturer 3",
|
||||
model="Test Model 3A",
|
||||
suggested_area="Test Area 2",
|
||||
)
|
||||
device_reg.async_update_device(
|
||||
device.id, disabled_by=device_registry.DeviceEntryDisabler.USER
|
||||
)
|
||||
|
||||
with patch("openai.Completion.create") as mock_create:
|
||||
await conversation.async_converse(hass, "hello", None, Context())
|
||||
|
Loading…
x
Reference in New Issue
Block a user