MapAgentStreamAssembler class
Ghép các khung {type, payload} của một batch thành [2].
Ném MapAgentStreamException ngay ở khung vi phạm (không đọc tiếp), và
MapAgentErrorFrameException ở khung error. Khung lạ (tên chưa có ở
§9.1.3) bị bỏ qua để agent mới thêm khung không làm hỏng client cũ.
Constructors
- MapAgentStreamAssembler({MapAgentProgressCallback? onProgress, MapAgentMessageDeltaCallback? onMessageDelta})
Properties
- ended → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- messageDone → bool
-
Đã nhận
message_delta { done: true }— chữ của model đã hết.no setter - onMessageDelta → MapAgentMessageDeltaCallback?
-
Một mẩu
aiMessage(message_delta),done: trueở mẩu cuối. Bản chuẩn vẫn làaiMessagecủabatch_end.final - onProgress → MapAgentProgressCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- started → bool
-
no setter
Methods
-
add(
Object? frame) → void - Nạp một khung đã parse từ JSON.
-
finish(
) → Map< String, dynamic> -
[2]đã ghép. Ném MapAgentStreamException khi stream đóng trướcbatch_starthoặcbatch_end. -
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