Attributes

Behavior

Attributes that control the widget's interactive behavior.

default-open

When set, the chat window opens automatically on page load.

PropertyValue
Typeboolean
Defaulttrue
<!-- Chat open on load -->
<tolki-chat bot="..." default-open></tolki-chat>
<tolki-chat bot="..." default-open="true"></tolki-chat>

<!-- Chat closed on load -->
<tolki-chat bot="..." default-open="false"></tolki-chat>

expandable

Allows the user to expand the chat window to fullscreen.

PropertyValue
Typeboolean
Defaulttrue
<!-- Expansion enabled (default) -->
<tolki-chat bot="..." expandable></tolki-chat>

<!-- Expansion disabled -->
<tolki-chat bot="..." expandable="false"></tolki-chat>

show-rating

Shows a conversation rating prompt (1–5 stars) after a period of inactivity following an assistant response. The rating is shown only once per chat session.

Accepts true (default delay of 90 seconds), false (disabled), or a number of seconds for a custom delay.

PropertyValue
Typeboolean | number
Defaulttrue (90 seconds)
<!-- Rating enabled with default delay (90s) -->
<tolki-chat bot="..." show-rating></tolki-chat>

<!-- Rating disabled -->
<tolki-chat bot="..." show-rating="false"></tolki-chat>

<!-- Custom delay: 30 seconds -->
<tolki-chat bot="..." show-rating="30"></tolki-chat>

show-sources

When enabled, the assistant toolbar shows a "Sources" button that opens a sidebar with the document search results used to generate the response. The sidebar appears on the opposite side of the chat widget.

PropertyValue
Typeboolean
Defaultfalse
<!-- Show document sources -->
<tolki-chat bot="..." show-sources></tolki-chat>

<!-- Hide document sources (default) -->
<tolki-chat bot="..." show-sources="false"></tolki-chat>
This attribute is automatically enabled on localhost and studio.tolki.ai.

show-queries

When enabled, the sources sidebar displays additional debug information for each search: the query text, the query search ID, and the results search ID.

PropertyValue
Typeboolean
Defaultfalse
<!-- Show query debug info in sources sidebar -->
<tolki-chat bot="..." show-sources show-queries></tolki-chat>
Requires show-sources to be enabled for the sidebar to appear. This is a debug attribute.

unclosable

When enabled, the user cannot close the chat window. Useful for inline widgets or when the chat must always remain visible.

PropertyValue
Typeboolean
Defaultfalse
<!-- Chat cannot be closed -->
<tolki-chat bot="..." unclosable></tolki-chat>

<!-- Standard behavior (closable) -->
<tolki-chat bot="..." unclosable="false"></tolki-chat>