pretty_repr() — langchain Function Reference
Architecture documentation for the pretty_repr() function in chat.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a7370f78_d6a3_5fb0_404d_3cd84faa406a["pretty_repr()"] 4766cfc7_f772_eccc_6561_2122efd2c5e8["BaseStringMessagePromptTemplate"] a7370f78_d6a3_5fb0_404d_3cd84faa406a -->|defined in| 4766cfc7_f772_eccc_6561_2122efd2c5e8 47fe42aa_c8e0_87b2_ad04_4343c7ef26cb["pretty_repr()"] a7370f78_d6a3_5fb0_404d_3cd84faa406a -->|calls| 47fe42aa_c8e0_87b2_ad04_4343c7ef26cb style a7370f78_d6a3_5fb0_404d_3cd84faa406a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/prompts/chat.py lines 338–350
def pretty_repr(self, html: bool = False) -> str:
"""Human-readable representation.
Args:
html: Whether to format as HTML.
Returns:
Human-readable representation.
"""
# TODO: Handle partials
title = self.__class__.__name__.replace("MessagePromptTemplate", " Message")
title = get_msg_title_repr(title, bold=html)
return f"{title}\n\n{self.prompt.pretty_repr(html=html)}"
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does pretty_repr() do?
pretty_repr() is a function in the langchain codebase, defined in libs/core/langchain_core/prompts/chat.py.
Where is pretty_repr() defined?
pretty_repr() is defined in libs/core/langchain_core/prompts/chat.py at line 338.
What does pretty_repr() call?
pretty_repr() calls 1 function(s): pretty_repr.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free