Skip to main content

ChatMessage

No description

type ChatMessage implements Node {
id: ID!
deletedAt: Time
conversationID: ID!
role: String!
content: String!
toolCalls: [Map]
toolResults: [Map]
tokensUsed: Int!
createdAt: Time!
conversation: ChatConversation!
}

Fields

ChatMessage.id ● ID! non-null scalar

ChatMessage.deletedAt ● Time scalar

Soft-delete timestamp. If set, record is considered deleted.

ChatMessage.conversationID ● ID! non-null scalar

Foreign key to parent conversation

ChatMessage.role ● String! non-null scalar

Message role: user, assistant, system, tool

ChatMessage.content ● String! non-null scalar

Message text content

ChatMessage.toolCalls ● [Map] list scalar

Tool calls made by assistant (JSON array)

ChatMessage.toolResults ● [Map] list scalar

Tool results returned (JSON array)

ChatMessage.tokensUsed ● Int! non-null scalar

Total tokens consumed by this message

ChatMessage.createdAt ● Time! non-null scalar

ChatMessage.conversation ● ChatConversation! non-null object

Interfaces

Node interface

An object with an ID. Follows the Relay Global Object Identification Specification

Member Of

ChatMessageEdge object