Skip to main content
await canopy.updateDialogue({
    role: "system",
    content: "This is a new message.", 
    dialogueIndex: 4
});
Updates a dialogue at a given dialogueIndex from the messageThread. More information here .

Parameters

dialogueIndex
number
required
The index in the message thread array of the dialogue. Must be less than the length of the messageThread array.
role
string
required
More information here .
content
string
required

Response

You will get a JSON response with the following fields:
success
boolean
timestamp
number
messageThread
array
An array of objects, where each object is a dialogue.