LLMResult class

Result returned by the LLM.

Inheritance

Constructors

LLMResult({required String id, required String output, required FinishReason finishReason, required Map<String, dynamic> metadata, required LanguageModelUsage usage, bool streaming = false})
Result returned by the LLM.
const

Properties

finishReason FinishReason
The reason the model stopped generating tokens.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Result id.
finalinherited
metadata Map<String, dynamic>
Other metadata about the generation.
finalinherited
output String
Generated output.
finalinherited
outputAsString String
Returns the output as a string.
no setteroverride
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.
finalinherited
usage LanguageModelUsage
Usage stats for the generation.
finalinherited

Methods

concat(LanguageModelResult<String> other) LLMResult
Merges this result with another by concatenating the outputs.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(covariant LanguageModelResult<String> other) bool
The equality operator.
inherited