chat_result.py — langchain Source File
Architecture documentation for chat_result.py, a python file in the langchain codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1b9b7eaf_6c6b_3125_32c2_ca3cac5f4f32["chat_result.py"] 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7["pydantic"] 1b9b7eaf_6c6b_3125_32c2_ca3cac5f4f32 --> 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7 3bd68d31_2a9b_9448_d8ba_c386f0e45f29["langchain_core.outputs.chat_generation"] 1b9b7eaf_6c6b_3125_32c2_ca3cac5f4f32 --> 3bd68d31_2a9b_9448_d8ba_c386f0e45f29 style 1b9b7eaf_6c6b_3125_32c2_ca3cac5f4f32 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"""Chat result schema."""
from pydantic import BaseModel
from langchain_core.outputs.chat_generation import ChatGeneration
class ChatResult(BaseModel):
"""Use to represent the result of a chat model call with a single prompt.
This container is used internally by some implementations of chat model, it will
eventually be mapped to a more general `LLMResult` object, and then projected into
an `AIMessage` object.
LangChain users working with chat models will usually access information via
`AIMessage` (returned from runnable interfaces) or `LLMResult` (available via
callbacks). Please refer the `AIMessage` and `LLMResult` schema documentation for
more information.
"""
generations: list[ChatGeneration]
"""List of the chat generations.
Generations is a list to allow for multiple candidate generations for a single
input prompt.
"""
llm_output: dict | None = None
"""For arbitrary LLM 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 is provider-specific.
Users should generally avoid relying on this field and instead rely on accessing
relevant information from standardized fields present in `AIMessage`.
"""
Classes
Dependencies
- langchain_core.outputs.chat_generation
- pydantic
Source
Frequently Asked Questions
What does chat_result.py do?
chat_result.py is a source file in the langchain codebase, written in python.
What does chat_result.py depend on?
chat_result.py imports 2 module(s): langchain_core.outputs.chat_generation, pydantic.
Where is chat_result.py in the architecture?
chat_result.py is located at libs/core/langchain_core/outputs/chat_result.py (directory: libs/core/langchain_core/outputs).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free