Defines the shape of the individual message that makes up the messages array that is passed back and forth with the Skip API Server

Constructors

Properties

content: string

The content of the message, either the user's input or the system's response

conversationDetailID: string

The conversation detail ID for the message, used to track the message

createdAt?: Date

The date and time the message was created

error?: string

If the message reflects an error message the information is provided here

hiddenToUser?: boolean

hiddenToUser - this is true if a message is only for internal system puprose and not shown to a user

reflectionInsights?: string

Optional, this text is from Skip during the generation of a particular response and represents the step-wise reasoning Skip went through to get to a particular response. This information along with the preceding messages, User Rating and User Feedback can be very helpful during a learning cycle to build notes and other artifacts that can train Skip to learn more about the user/organization's preferences and the context of the conversation.

role: "user" | "system"

The role of the message, either "user" or "system"

summaryOfEarlierConveration?: string

Optional, this text contains an AI generated summary of the prior messages in the conversation going back in time through the last such summary. This allows "compression" of a longer conversation to preserve space in a context window, improve performance and simplify inference.

updatedAt?: Date

The date and time the message was last updated

userFeedback?: string

Optional, text feedback from the user reflecting their satisfaction with the response. Of course the subsequent messages can contain this, but this is an element that the UI will surface that allows a user to specifically provide feedback on each message.

userRating?: number

Rating scale between 1 and 10, 1 reflecting the lowest rating and 10 reflecting the highest rating from the user in terms of their satisfaction with the response