NativeLastTurnEnd enum

How native's last send ended (LiteRtLmTurnEnd in the patched c/conversation.h), as litert_lm_conversation_get_last_turn_end reports it after a send (§23) and litert_lm_conversation_rewind_cancelled_turn after waiting for one (§16). In the C enum's order: the index is the code.

Inheritance
Available extensions

Values

none → const NativeLastTurnEnd

Nothing was sent, or it was rewound.

completed → const NativeLastTurnEnd

The reply ended by itself (end of sequence).

cancelled → const NativeLastTurnEnd

Cancelled; the conversation fails until it is rewound.

failed → const NativeLastTurnEnd

Ended with an error.

running → const NativeLastTurnEnd

Had not ended when the wait timed out.

outputLimit → const NativeLastTurnEnd

The reply reached max_output_tokens.

contextLimit → const NativeLastTurnEnd

The decode filled the context window (max_num_tokens): the reply is cut.

contextFull → const NativeLastTurnEnd

The input did not fit what the context window has left, or the window has no room for any prefill signature (status RESOURCE_EXHAUSTED). Only these context-window checks end a turn here (native 37d1ec59): any other RESOURCE_EXHAUSTED, a failed allocation for one, ends failed with status 8, which a rewind refuses. So status 8 alone is not a full context: read this end. The input is not in the history, and the conversation fails every later send until it is rewound to the turn's checkpoint.

refused → const NativeLastTurnEnd

The last send was refused before it started (a NULL argument, a message that is not JSON), with its status: nothing ran, and the conversation is as the send before it left it. Reported so that the end of that earlier send is never read as this one's; a rewind still decides by the last send that started.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

fromCode(int code) → NativeLastTurnEnd?
The end native reported as code, or null for a code this client does not know.

Constants

values → const List<NativeLastTurnEnd>
A constant List of the values in this enum, in order of their declaration.