From 600cc591475d975bdd01304c9d1227bb20b74bc0 Mon Sep 17 00:00:00 2001 From: Ovidijus Parsiunas Date: Wed, 8 Jan 2025 22:25:22 +0900 Subject: [PATCH] updating introMessage documentation to allow arrays --- website/docs/docs/messages/messages.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/docs/docs/messages/messages.mdx b/website/docs/docs/messages/messages.mdx index e2c3adb8b..f85b7a785 100644 --- a/website/docs/docs/messages/messages.mdx +++ b/website/docs/docs/messages/messages.mdx @@ -76,13 +76,14 @@ import Tabs from '@theme/Tabs'; ### `introMessage` {#introMessage} -- Type: \{`text?: string`, `html?: string`\} +- Type: \{`text?: string`, `html?: string`\} | `Array` Initial `ai` message that is displayed when the chat is loaded. It is different to [`history`](#history) as it will not trigger the [`onMessage`](/docs/events#onMessage) listener, will not be part of the returned messages when [`getMessages`](/docs/methods#getMessages) is called and is not taken into consideration when calculating [`requestBodyLimits`](/docs/connect#requestBodyLimits).
`html` is used to render [custom code](/docs/messages/HTML) and can be coupled with a [`deep-chat-temporary-message`](/docs/messages/HTML#deepChatClasses) -class to make this message disappear after a new one is added. +class to make this message disappear after a new one is added.
+This can either be defined as an object for one message, or as an array for multiple ones. #### Example