Messages class

Constructors

Messages({required Role role, String? content, String? name, Map<String, dynamic>? functionCall})

Properties

content String?
The contents of the message. is required for all messages except assistant messages with function calls.content content
final
functionCall Map<String, dynamic>?
The name and arguments of a function that should be called, as generated by the model. functionCall
final
hashCode int
The hash code for this object.
no setterinherited
name String?
The name of the author of this message. is required if role is , and it should be the name of the function whose response is in the . May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.name function content name
final
role Role
The role of the messages author. One of , , , or .system user assistant function role
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
normal model
toJsonFunctionStruct() Map<String, dynamic>
function model
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited