ChatCompletionToolMessage class
abstract
Properties
-
content
→ String
-
The contents of the tool message.
no setter
-
copyWith
→ _$$ChatCompletionToolMessageImplCopyWith<_$ChatCompletionToolMessageImpl>
-
Create a copy of ChatCompletionMessage
with the given fields replaced by the non-null parameter values.
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
role
→ ChatCompletionMessageRole
-
The role of the messages author, in this case
tool
.
no setter
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
toolCallId
→ String
-
Tool call that this message is responding to.
no setter
Methods
-
map<TResult extends Object?>({required TResult system(ChatCompletionSystemMessage value), required TResult user(ChatCompletionUserMessage value), required TResult assistant(ChatCompletionAssistantMessage value), required TResult tool(ChatCompletionToolMessage value), required TResult function(ChatCompletionFunctionMessage value)})
→ TResult
-
inherited
-
mapOrNull<TResult extends Object?>({TResult? system(ChatCompletionSystemMessage value)?, TResult? user(ChatCompletionUserMessage value)?, TResult? assistant(ChatCompletionAssistantMessage value)?, TResult? tool(ChatCompletionToolMessage value)?, TResult? function(ChatCompletionFunctionMessage value)?})
→ TResult?
-
inherited
-
maybeMap<TResult extends Object?>({TResult system(ChatCompletionSystemMessage value)?, TResult user(ChatCompletionUserMessage value)?, TResult assistant(ChatCompletionAssistantMessage value)?, TResult tool(ChatCompletionToolMessage value)?, TResult function(ChatCompletionFunctionMessage value)?, required TResult orElse()})
→ TResult
-
inherited
-
maybeWhen<TResult extends Object?>({TResult system(ChatCompletionMessageRole role, String content, String? name)?, TResult user(ChatCompletionMessageRole role, ChatCompletionUserMessageContent content, String? name)?, TResult assistant(ChatCompletionMessageRole role, String? content, String? refusal, String? name, List<ChatCompletionMessageToolCall>? toolCalls, ChatCompletionMessageFunctionCall? functionCall, ChatCompletionAssistantMessageAudio? audio)?, TResult tool(ChatCompletionMessageRole role, String content, String toolCallId)?, TResult function(ChatCompletionMessageRole role, String? content, String name)?, required TResult orElse()})
→ TResult
-
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson()
→ Map<String, dynamic>
-
Serializes this ChatCompletionMessage to a JSON map.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
when<TResult extends Object?>({required TResult system(ChatCompletionMessageRole role, String content, String? name), required TResult user(ChatCompletionMessageRole role, ChatCompletionUserMessageContent content, String? name), required TResult assistant(ChatCompletionMessageRole role, String? content, String? refusal, String? name, List<ChatCompletionMessageToolCall>? toolCalls, ChatCompletionMessageFunctionCall? functionCall, ChatCompletionAssistantMessageAudio? audio), required TResult tool(ChatCompletionMessageRole role, String content, String toolCallId), required TResult function(ChatCompletionMessageRole role, String? content, String name)})
→ TResult
-
inherited
-
whenOrNull<TResult extends Object?>({TResult? system(ChatCompletionMessageRole role, String content, String? name)?, TResult? user(ChatCompletionMessageRole role, ChatCompletionUserMessageContent content, String? name)?, TResult? assistant(ChatCompletionMessageRole role, String? content, String? refusal, String? name, List<ChatCompletionMessageToolCall>? toolCalls, ChatCompletionMessageFunctionCall? functionCall, ChatCompletionAssistantMessageAudio? audio)?, TResult? tool(ChatCompletionMessageRole role, String content, String toolCallId)?, TResult? function(ChatCompletionMessageRole role, String? content, String name)?})
→ TResult?
-
inherited