Home / Function/ test_action_with_finish() — langchain Function Reference

test_action_with_finish() — langchain Function Reference

Architecture documentation for the test_action_with_finish() function in test_react_single_input.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  df6d1497_dda3_a97d_015e_c3b857021ddb["test_action_with_finish()"]
  d02558d7_3d60_16fd_ff0e_bce803d6a351["test_react_single_input.py"]
  df6d1497_dda3_a97d_015e_c3b857021ddb -->|defined in| d02558d7_3d60_16fd_ff0e_bce803d6a351
  style df6d1497_dda3_a97d_015e_c3b857021ddb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py lines 38–45

def test_action_with_finish() -> None:
    """Test that if final thought is in action/action input, error is raised."""
    parser = ReActSingleInputOutputParser()
    _input = """Thought: agent thought here
Action: search Final Answer:
Action Input: what is the temperature in SF?"""
    with pytest.raises(OutputParserException):
        parser.invoke(_input)

Domain

Subdomains

Frequently Asked Questions

What does test_action_with_finish() do?
test_action_with_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_action_with_finish() defined?
test_action_with_finish() is defined in libs/langchain/tests/unit_tests/agents/output_parsers/test_react_single_input.py at line 38.

Analyze Your Own Codebase

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

Try Supermodel Free