> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/reference/widgets/display/chat.md).

# Chat

Displays a conversation of user and bot messages with markup and expandable source citations

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-49fb68c4dcdbbcbbb96ff1b41363203c1f98c9ce%2Fwidget-chat.png?alt=media" alt="Chat with two questions about line 2 and the answers of a bot, each answer with a source document icon" width="688"><figcaption></figcaption></figure>

A chat shows a conversation between users and a bot, oldest message first. Messages take Markdown, so answers can hold bold words, lists and links, and each answer can list its sources, such as the page of a manual it was taken from. Your logic delivers the conversation, for example from an AI model that answers questions from your shift logs and work instructions, and can clear it again.

**Good for:** assistants that answer from plant documents, support and help desks, message histories.

## Properties

The widget's General tab lists these properties under Receives and Emits. Drop an executor's output, input or trigger onto a row to link it. An example also fills an unlinked widget as demo data in the App Builder.

{% tabs %}
{% tab title="Receives" %}
**`data`** (from an output, `Array<object>`): The conversation to display, oldest first.

<details>

<summary>Example</summary>

```json
[
  {
    "role": "user",
    "content": "How do I reset the filter?"
  },
  {
    "role": "bot",
    "content": "Open **Settings** and press *Reset*.",
    "sources": [
      {
        "name": "manual.pdf",
        "pageNumber": 12,
        "lineFrom": 3,
        "lineTo": 9
      }
    ]
  }
]
```

</details>

**`clear`** (from an output, `boolean`): Truthy values clear the conversation.

<details>

<summary>Example</summary>

```json
true
```

</details>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.heisenware.com/reference/widgets/display/chat.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
