• Regenerate the assistant response to the last user message of a topic as a stream and returns a reader. This will delete the last message and replace it with a new message. 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 { reader, queryId } = await trieve.regenerateMessageReader({
    topic_id: "3c90c3cc-1d76-27198-8888-8dd25736052a",
    });

    Parameters

    Returns Promise<{
        queryId: null | string;
        reader: ReadableStreamDefaultReader<Uint8Array>;
    }>