interface ChatMessage {
    content: string;
    id: string;
    role: "user" | "assistant" | "system";
    timestamp?: string;
    type?:
        | "update"
        | "complete"
        | "add_entities"
        | "remove_entities";
}

Properties

content: string

The content of the message. For update and complete messages, this is the partial or final response. For add_entities and remove_entities messages, this is the json encoded list of entities.

id: string

The id of the message. This is used to identify the message in the conversation. It is generated by the chat agent, and is used to update the message in the conversation. (It is repeated in each update, but this is ok because it is used to identify the message in the conversation.)

role: "user" | "assistant" | "system"

The role of the message.

timestamp?: string

The timestamp of the message in ISO 8601 format.

type?:
    | "update"
    | "complete"
    | "add_entities"
    | "remove_entities"

The type of the message.