Home / Function/ test_get_final_answer_new_line() — langchain Function Reference

test_get_final_answer_new_line() — langchain Function Reference

Architecture documentation for the test_get_final_answer_new_line() function in test_mrkl.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  64a5a894_6da7_3ce9_2006_33cd891c1428["test_get_final_answer_new_line()"]
  11e4d0ce_1ab2_b50d_7115_96011ca80049["test_mrkl.py"]
  64a5a894_6da7_3ce9_2006_33cd891c1428 -->|defined in| 11e4d0ce_1ab2_b50d_7115_96011ca80049
  893a0b31_0a99_6756_3281_2a5a05606fe2["get_action_and_input()"]
  64a5a894_6da7_3ce9_2006_33cd891c1428 -->|calls| 893a0b31_0a99_6756_3281_2a5a05606fe2
  style 64a5a894_6da7_3ce9_2006_33cd891c1428 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/test_mrkl.py lines 99–104

def test_get_final_answer_new_line() -> None:
    """Test getting final answer."""
    llm_output = "Thought: I can now answer the question\nFinal Answer:\n1994"
    action, action_input = get_action_and_input(llm_output)
    assert action == "Final Answer"
    assert action_input == "1994"

Domain

Subdomains

Frequently Asked Questions

What does test_get_final_answer_new_line() do?
test_get_final_answer_new_line() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/test_mrkl.py.
Where is test_get_final_answer_new_line() defined?
test_get_final_answer_new_line() is defined in libs/langchain/tests/unit_tests/agents/test_mrkl.py at line 99.
What does test_get_final_answer_new_line() call?
test_get_final_answer_new_line() calls 1 function(s): get_action_and_input.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free