ReasoningPart class final

The model's intermediate reasoning ("chain of thought").

Surfaced separately from prose so the UI can disclose it in a collapsible region rather than mixing it into the answer.

Inheritance

Constructors

ReasoningPart(String text, {String? signature})
Creates a reasoning part holding text.
const
ReasoningPart.buffered(StringBuffer buffer, {String? signature})
Creates a reasoning part whose content is accumulated in buffer, materialized lazily on first read of text.
ReasoningPart.fromJson(Map<String, Object?> json)
Reconstructs a ReasoningPart from json.
factory

Properties

buffer → StringBuffer?
The live accumulation buffer backing this part, or null for an ordinary part. Internal to the streaming reducer.
no setter
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
signature → String?
An opaque provider signature for this reasoning block, when the provider supplies one (e.g. Anthropic extended thinking). It must be preserved and replayed verbatim on subsequent turns or the API rejects the request.
final
text → String
The reasoning content.
no setter

Methods

copyWith({String? text, String? signature}) → ReasoningPart
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes this part, including its type discriminator.
override
toString() → String
A string representation of this object.
override

Operators

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