langchain.js
    Preparing search index...
    MessageType: "ai" | "human" | "tool" | "system" | string & NonNullable<unknown>

    Represents the possible types of messages in the system. Includes standard message types ("ai", "human", "tool", "system") and allows for custom string types that are non-null.

    // Standard message types
    const messageType1: MessageType = "ai";
    const messageType2: MessageType = "human";

    // Custom message type
    const messageType3: MessageType = "custom_type";