ChatMessage.fromText constructor

ChatMessage.fromText(
  1. ChatRole role,
  2. String text, {
  3. String? authorName,
})

Creates a ChatMessage with TextContent from a string.

Implementation

ChatMessage.fromText(this.role, String text, {this.authorName})
    : contents = [TextContent(text)],
      createdAt = null,
      messageId = null,
      rawRepresentation = null,
      additionalProperties = null;