> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canopylabs.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# canopy.appendDialogue

<RequestExample>
  ```javascript index.js
  const dialogue = {
    role:"system", // or "user", "assistant" 
    content:"Tell the user that they are nice"
  };

  canopy.appendDialogue(dialogue);
  ```
</RequestExample>

You can add a dialogue to the end of the `messageThread`.

### Parameters

<ParamField path="dialogue" type="string" required="true">
  A dialogue must consist of a `role` and `content`. More information on allowed value can be found
  <a href="/documentation/llm-concepts#overview">here</a>.
</ParamField>

### Response

You will get a <b>JSON</b> response with the following fields:

<ResponseField name="success" type="boolean" />

<ResponseField name="timestamp" type="number" />

<ResponseField name="messageThread" type="array">
  An array of objects, where each object is a `dialogue`.
</ResponseField>
