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:
Paulus Schoutsen 2024-05-28 23:07:00 -04:00 committed by GitHub
parent fa9ebb062c
commit d22871f1fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -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):

View File

@ -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": {},
} }