test_final_answer_after_parsable_action() — langchain Function Reference
Architecture documentation for the test_final_answer_after_parsable_action() function in test_mrkl_output_parser.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d2fe97a1_aede_9c74_8151_ac5ca6175ae1["test_final_answer_after_parsable_action()"] 0be9c738_c626_f1e6_d88c_a34315fe9090["test_mrkl_output_parser.py"] d2fe97a1_aede_9c74_8151_ac5ca6175ae1 -->|defined in| 0be9c738_c626_f1e6_d88c_a34315fe9090 style d2fe97a1_aede_9c74_8151_ac5ca6175ae1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/agents/test_mrkl_output_parser.py lines 69–81
def test_final_answer_after_parsable_action() -> None:
llm_output = """
Observation: I can use the `foo` tool to achieve the goal.
Action: foo
Action Input: bar
Final Answer: The best pizza to eat is margaritta
"""
with pytest.raises(OutputParserException) as exception_info:
mrkl_output_parser.parse(llm_output)
assert (
"Parsing LLM output produced both a final answer and a parse-able action"
in exception_info.value.args[0]
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_final_answer_after_parsable_action() do?
test_final_answer_after_parsable_action() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_mrkl_output_parser.py.
Where is test_final_answer_after_parsable_action() defined?
test_final_answer_after_parsable_action() is defined in libs/langchain/tests/unit_tests/agents/test_mrkl_output_parser.py at line 69.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free