Ask a question to get started
Enter to sendā¢Shift+Enter new line
LLMResult()
BaseModel
Generated outputs.
The first dimension of the list represents completions for different input prompts.
The second dimension of the list represents different candidate generations for a given prompt.
list[list[Generation]]
list[list[ChatGeneration]]
ChatGeneration is a subclass of Generation that has a field for a structured chat message.
ChatGeneration
Generation
For arbitrary model provider-specific output.
This dictionary is a free-form dictionary that can contain any information that the provider wants to return. It is not standardized and keys may vary by provider and over time.
Users should generally avoid relying on this field and instead rely on accessing relevant information from standardized fields present in AIMessage.
List of metadata info for model call for each input.
See langchain_core.outputs.run_info.RunInfo for details.
langchain_core.outputs.run_info.RunInfo
Type is used exclusively for serialization purposes.
Flatten generations into a single list.
Unpack list[list[Generation]] -> list[LLMResult] where each returned LLMResult contains only a single Generation. If token usage information is available, it is kept only for the LLMResult corresponding to the top-choice Generation, to avoid over-counting of token usage downstream.
list[list[Generation]] -> list[LLMResult]
LLMResult
A container for results of an LLM call.
Both chat models and LLMs generate an LLMResult object. This object contains the generated outputs and any additional information that the model provider wants to return.