StreamData class
Professional representation of streaming data.
Constructors
-
StreamData({required StreamDataType type, required dynamic content, Map<
String, dynamic> ? metadata}) -
Creates a new StreamData instance.
const
-
StreamData.completion({Map<
String, dynamic> ? metadata}) -
Creates a completion stream data instance.
factory
-
StreamData.error(String error, {Map<
String, dynamic> ? metadata}) -
Creates an error stream data instance.
factory
-
StreamData.text(String text, {Map<
String, dynamic> ? metadata}) -
Creates a text stream data instance.
factory
-
StreamData.toolCall(Map<
String, dynamic> toolCall, {Map<String, dynamic> ? metadata}) -
Creates a tool call stream data instance.
factory
Properties
- content → dynamic
-
The actual content of the stream.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ Map<
String, dynamic> ? -
Optional metadata associated with the stream.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → StreamDataType
-
The type of data being streamed.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited