Interface: ChatMessage
A single chat message. content is nullable because an assistant turn that
only calls tools carries content: null.
Properties
Section titled “Properties”content?
Section titled “content?”
optionalcontent?:string|ChatContentPart[] |null
optionalname?:string
role:
string
See ChatRole for the standard values; widened for provider extensions.
tool_call_id?
Section titled “tool_call_id?”
optionaltool_call_id?:string
Set on a tool turn, keying it back to the call it answers.
tool_calls?
Section titled “tool_calls?”
optionaltool_calls?:ChatToolCall[]