Conversation: fix links and terminology (#2183)

This commit is contained in:
c0ffeeca7 2024-05-22 13:45:04 +02:00 committed by GitHub
parent c259ffeb0e
commit 925177c74f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ sidebar_label: "Conversation API"
Intents can be recognized from text and fired using the [conversation integration](https://www.home-assistant.io/integrations/conversation/).
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.
An API endpoint is available which receives an input sentence and produces an [conversation response](#conversation-response). A "conversation" is tracked across multiple inputs and responses by passing a [conversation id](#conversation-id) generated by Home Assistant.
The API is available via the Rest API and Websocket API.
@ -81,14 +81,14 @@ The JSON response from `/api/conversation/process` contains information about th
The following properties are available in the `"response"` object:
| Name | Type | Description |
|-----------------|------------|------------------------------------------------------------------------------------------------------------------|
| --------------- | ---------- | ----------------------------------------------------------------------------------------- |
| `response_type` | string | One of `action_done`, `query_answer`, or `error` (see [response types](#response-types)). |
| `data` | dictionary | Relevant data for each [response type](#response_types). |
| `language` | string | The language of the intent and response. |
| `speech` | dictionary | Optional. Response text to speak to the user (see [speech](#speech)). |
The [conversation id](#conversation-id) is returned alongside the intent response.
The [conversation id](#conversation-id) is returned alongside the conversation response.
## Response Types
@ -255,7 +255,7 @@ If the speech is [SSML](https://www.w3.org/TR/speech-synthesis11/), it will inst
## Conversation Id
Conversations can be tracked by a unique id generated from within Home Assistant if supported by the answering conversation agent. To continue a conversation, retrieve the `conversation_id` from the HTTP API response (alongside the [intent response](#intent-response)) and add it to the next [input sentence](#input-sentence):
Conversations can be tracked by a unique id generated from within Home Assistant if supported by the answering conversation agent. To continue a conversation, retrieve the `conversation_id` from the HTTP API response (alongside the [conversation response](#conversation-response)) and add it to the next input sentence:
Initial input sentence:
@ -271,7 +271,7 @@ JSON response contains conversation id:
{
"conversation_id": "<generated-id-from-ha>",
"response": {
(intent response)
(conversation response)
}
}
```