You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/hooks.md
+13-10
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ The `useMessages` hook allows you to track and manage the chatbot's messages.
270
270
| endStreamMessage |`async function`| A utility function used to indicate the end of an existing message stream, identical to `params.endMessageStream` detailed [**here**](/docs/api/params#endstreammessage). |
271
271
| removeMessage |`async function`| A utility function used to remove a message from the chat, identical to `params.removeMessage` detailed [**here**](/docs/api/params#removemessage). |
272
272
| messages |`Array<Message>`| Array containing all messages currently shown in the chatbot. |
273
-
|setMessages|`function`|Setter for manipulating messages array directly, **not recommended** to use this so proceed with caution. |
273
+
|replaceMessages|`function`|Directly replaces the current messages with provided messages.|
274
274
275
275
#### Code Example
276
276
```jsx
@@ -328,7 +328,7 @@ The `usePaths` hook allows you to track and manage the chatbot's paths.
328
328
| getPrevPath |`function`| Retrieves the previous path of the user. |
329
329
| goToPath |`function`| Sends the user to a specified path, identical to `params.goToPath` detailed [**here**](/docs/api/params#gotopath). |
330
330
| paths |`Array<string>`| Array containing all paths the user has taken in order. |
331
-
|setPaths|`function`|Setter for manipulating paths array directly, **not recommended** to use this so proceed with caution. |
331
+
|replacePaths|`function`|Directly replaces the current paths with provided paths (hardly a reason to do this, think twice).|
332
332
333
333
#### Code Example
334
334
```jsx
@@ -358,19 +358,21 @@ The `useSettings` hook allows you to track and manage the chatbot's settings.
0 commit comments