mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Reduce the intent response data sent to LLMs (#118346)
* Reduce the intent response data sent to LLMs * No longer delete speech
This commit is contained in:
parent
fa9ebb062c
commit
d22871f1fd
@ -195,7 +195,10 @@ class IntentTool(Tool):
|
|||||||
assistant=tool_context.assistant,
|
assistant=tool_context.assistant,
|
||||||
device_id=tool_context.device_id,
|
device_id=tool_context.device_id,
|
||||||
)
|
)
|
||||||
return intent_response.as_dict()
|
response = intent_response.as_dict()
|
||||||
|
del response["language"]
|
||||||
|
del response["card"]
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
class AssistAPI(API):
|
class AssistAPI(API):
|
||||||
|
@ -165,13 +165,11 @@ async def test_assist_api(
|
|||||||
device_id="test_device",
|
device_id="test_device",
|
||||||
)
|
)
|
||||||
assert response == {
|
assert response == {
|
||||||
"card": {},
|
|
||||||
"data": {
|
"data": {
|
||||||
"failed": [],
|
"failed": [],
|
||||||
"success": [],
|
"success": [],
|
||||||
"targets": [],
|
"targets": [],
|
||||||
},
|
},
|
||||||
"language": "*",
|
|
||||||
"response_type": "action_done",
|
"response_type": "action_done",
|
||||||
"speech": {},
|
"speech": {},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user