on_tool_end() — langchain Function Reference
Architecture documentation for the on_tool_end() function in stdout.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9b871232_001e_2f5e_a2c6_e390b77ed440["on_tool_end()"] dcf2a9b2_8ab4_fbe0_5f57_ef548417d10e["StdOutCallbackHandler"] 9b871232_001e_2f5e_a2c6_e390b77ed440 -->|defined in| dcf2a9b2_8ab4_fbe0_5f57_ef548417d10e style 9b871232_001e_2f5e_a2c6_e390b77ed440 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/callbacks/stdout.py lines 70–92
def on_tool_end(
self,
output: Any,
color: str | None = None,
observation_prefix: str | None = None,
llm_prefix: str | None = None,
**kwargs: Any,
) -> None:
"""If not the final action, print out observation.
Args:
output: The output to print.
color: The color to use for the text.
observation_prefix: The observation prefix.
llm_prefix: The LLM prefix.
**kwargs: Additional keyword arguments.
"""
output = str(output)
if observation_prefix is not None:
print_text(f"\n{observation_prefix}")
print_text(output, color=color or self.color)
if llm_prefix is not None:
print_text(f"\n{llm_prefix}")
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does on_tool_end() do?
on_tool_end() is a function in the langchain codebase, defined in libs/core/langchain_core/callbacks/stdout.py.
Where is on_tool_end() defined?
on_tool_end() is defined in libs/core/langchain_core/callbacks/stdout.py at line 70.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free