OpenAIChatCompletionChoiceMessageModel class final

This represents the message of the OpenAIChatCompletionChoiceModel model of the OpenAI API, which is used and get returned while using the OpenAIChat methods.

Implementers

Constructors

OpenAIChatCompletionChoiceMessageModel({required OpenAIChatMessageRole role, required List<OpenAIChatCompletionChoiceMessageContentItemModel>? content, List<OpenAIResponseToolCall>? toolCalls, String? name})
This represents the message of the OpenAIChatCompletionChoiceModel model of the OpenAI API, which is used and get returned while using the OpenAIChat methods.
const
OpenAIChatCompletionChoiceMessageModel.fromMap(Map<String, dynamic> json)
This is used to convert a Map<String, dynamic> object to a OpenAIChatCompletionChoiceMessageModel object.
factory

Properties

content → List<OpenAIChatCompletionChoiceMessageContentItemModel>?
The content of the message.
final
hashCode → int
The hash code for this object.
no setteroverride
haveContent → bool
Weither the message have content.
no setter
haveToolCalls → bool
Weither the message have tool calls.
no setter
name → String?
The message participent name.
final
role → OpenAIChatMessageRole
The role of the message.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolCalls → List<OpenAIResponseToolCall>?
The function that the model is requesting to call.
final

Methods

asRequestFunctionMessage({required String toolCallId}) → RequestFunctionMessage
Converts a response function message to a request function message, so that it can be used in the next request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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