Add ToolInput.device_id (#2180)

This commit is contained in:
Denis Shulyaka 2024-05-26 17:28:06 +03:00 committed by GitHub
parent 17e838240b
commit 8704a08e1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -143,6 +143,7 @@ class MyConversationEntity(conversation.ConversationEntity):
user_prompt=user_input.text, user_prompt=user_input.text,
language=user_input.language, language=user_input.language,
assistant=conversation.DOMAIN, assistant=conversation.DOMAIN,
device_id=user_input.device_id,
) )
try: try:
tool_response = await llm_api.async_call_tool( tool_response = await llm_api.async_call_tool(
@ -222,6 +223,7 @@ The `ToolInput` has following attributes:
| `user_prompt` | string | The raw text input that initiated the tool call | | `user_prompt` | string | The raw text input that initiated the tool call |
| `language` | string | The language of the conversation agent, or "*" for any language | | `language` | string | The language of the conversation agent, or "*" for any language |
| `assistant` | string | The assistant name used to control exposed entities. Currently only `conversation` is supported. | | `assistant` | string | The assistant name used to control exposed entities. Currently only `conversation` is supported. |
| `device_id` | string | The device_id of the device the user used to initiate the conversation. |
### API ### API