Documenet conversation WS API (#1636)

This commit is contained in:
Paulus Schoutsen 2023-01-19 10:53:17 -05:00 committed by GitHub
parent 44203a143c
commit b27e3c25e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View File

@ -5,10 +5,9 @@ sidebar_label: "Conversation API"
Intents can be recognized from text and fired using the [conversation integration](https://www.home-assistant.io/integrations/conversation/).
An HTTP API endpoint is available at `/api/conversation/process`, which receives an [input sentence](#input-sentence) and produces an [intent response](#intent-response).
A "conversation" is tracked across multiple inputs and responses using a [conversation id](#conversation-id) generated by Home Assistant.
An API endpoint is available which receives an input sentence and produces an [intent response](#intent-response). A "conversation" is tracked across multiple inputs and responses by passing a [conversation id](#conversation-id) generated by Home Assistant.
## Input Sentence
The API is available via the Rest API and Websocket API.
A sentence may be POST-ed to `/api/conversation/process` like:
@ -19,6 +18,16 @@ A sentence may be POST-ed to `/api/conversation/process` like:
}
```
Or sent via the WebSocket API like:
```json
{
"type": "conversation/process",
"text": "turn on the lights in the living room",
"language": "en"
}
```
The following input fields are available:
| Name | Type | Description |

View File

@ -187,9 +187,13 @@ module.exports = {
"intent_firing",
"intent_handling",
"intent_builtin",
"intent_conversation_api",
],
},
{
type: "category",
label: "Conversation",
items: ["intent_conversation_api", "core/conversation/custom_agent"],
},
{
type: "category",
label: "Native App Integration",
@ -205,7 +209,6 @@ module.exports = {
"creating_integration_brand",
"core/platform/application_credentials",
"core/platform/backup",
"core/conversation/custom_agent",
"core/platform/repairs",
"core/platform/reproduce_state",
"core/platform/significant_change",