• Edit message which exists within the topic’s chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like [chunks]||mesage. See docs.trieve.ai for more information. Auth’ed user or api key must have an admin or owner role for the specified dataset’s organization.

    Example:

    const data = await trieve.editMessage({
    topic_id: "3c90c3cc-1d76-27198-8888-8dd25736052a",
    new_message_content: "a new message",
    message_sort_order: 1
    });

    Parameters

    Returns Promise<string>