LanguageModelResult<O extends Object> class
abstract
Result returned by the model.
- Implementers
- Annotations
-
- @immutable
Constructors
-
LanguageModelResult.new({required String id, required O output, required FinishReason finishReason, required Map<
String, dynamic> metadata, required LanguageModelUsage usage, bool streaming = false}) -
Result returned by the model.
const
Properties
- finishReason → FinishReason
-
The reason the model stopped generating tokens.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Result id.
final
-
metadata
→ Map<
String, dynamic> -
Other metadata about the generation.
final
- output → O
-
Generated output.
final
- outputAsString → String
-
Returns the output as a string.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- streaming → bool
-
Whether the result of the language model is being streamed.
final
- usage → LanguageModelUsage
-
Usage stats for the generation.
final
Methods
-
concat(
LanguageModelResult< O> other) → LanguageModelResult<O> - Merges this result with another by concatenating the outputs.
-
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 ==(
covariant LanguageModelResult< O> other) → bool -
The equality operator.
override