test_finish() — langchain Function Reference
Architecture documentation for the test_finish() function in test_react_json_single_input.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 599d1ebb_0142_9aa4_b82e_71335997052b["test_finish()"] 693f10e9_0670_0fc2_07b5_f6aa601250db["test_react_json_single_input.py"] 599d1ebb_0142_9aa4_b82e_71335997052b -->|defined in| 693f10e9_0670_0fc2_07b5_f6aa601250db style 599d1ebb_0142_9aa4_b82e_71335997052b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/output_parsers/test_react_json_single_input.py lines 28–38
def test_finish() -> None:
"""Test standard parsing of agent finish."""
parser = ReActJsonSingleInputOutputParser()
_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_json_single_input.py.
Where is test_finish() defined?
test_finish() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_react_json_single_input.py at line 28.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free