test_finish() — langchain Function Reference
Architecture documentation for the test_finish() function in test_react_single_input.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 370de602_a78a_1337_b18a_392a9ac42d7c["test_finish()"] d02558d7_3d60_16fd_ff0e_bce803d6a351["test_react_single_input.py"] 370de602_a78a_1337_b18a_392a9ac42d7c -->|defined in| d02558d7_3d60_16fd_ff0e_bce803d6a351 style 370de602_a78a_1337_b18a_392a9ac42d7c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py lines 25–35
def test_finish() -> None:
"""Test standard parsing of agent finish."""
parser = ReActSingleInputOutputParser()
_input = """Thought: agent thought here
Final Answer: The temperature is 100"""
output = parser.invoke(_input)
expected_output = AgentFinish(
return_values={"output": "The temperature is 100"},
log=_input,
)
assert output == expected_output
Domain
Subdomains
Source
Frequently Asked Questions
What does test_finish() do?
test_finish() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py.
Where is test_finish() defined?
test_finish() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py at line 25.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free