InputMessage class

Input message for model sampling.

Annotations
  • @immutable

Constructors

InputMessage({required String role, required String content})
Creates an InputMessage.
const
InputMessage.assistant(String content)
Creates an assistant message.
const
InputMessage.fromJson(Map<String, dynamic> json)
Creates an InputMessage from JSON.
factory
InputMessage.system(String content)
Creates a system message.
const
InputMessage.user(String content)
Creates a user message.
const

Properties

content String
The content (can include template variables like {{item.prompt}}).
final
hashCode int
The hash code for this object.
no setteroverride
role String
The role of this message.
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>
Converts to JSON.
toString() String
A string representation of this object.
override

Operators

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