UserMessageContent class sealed
Content for a user message.
Supports two representations internally (UserMessageTextContent and UserMessagePartsContent), but always serializes to a list of content parts in JSON. Use fromJson to deserialize from either a plain string or a list of content objects.
- Implementers
Constructors
- UserMessageContent.fromJson(Object json)
-
Creates a UserMessageContent from JSON.
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromText(
String text) → UserMessageContent - Creates a text content.
-
parts(
List< InputContent> parts) → UserMessageContent - Creates a parts content.