Home / Function/ test_single_agent_action_observation() — langchain Function Reference

test_single_agent_action_observation() — langchain Function Reference

Architecture documentation for the test_single_agent_action_observation() function in test_xml.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  189a5971_bab9_8df8_20dc_8c86d28ab8af["test_single_agent_action_observation()"]
  8e952513_6b41_3d5a_f5ac_e4a1e0bd30b1["test_xml.py"]
  189a5971_bab9_8df8_20dc_8c86d28ab8af -->|defined in| 8e952513_6b41_3d5a_f5ac_e4a1e0bd30b1
  style 189a5971_bab9_8df8_20dc_8c86d28ab8af fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/format_scratchpad/test_xml.py lines 6–17

def test_single_agent_action_observation() -> None:
    # Arrange
    agent_action = AgentAction(tool="Tool1", tool_input="Input1", log="Log1")
    observation = "Observation1"
    intermediate_steps = [(agent_action, observation)]

    # Act
    result = format_xml(intermediate_steps)
    expected_result = """<tool>Tool1</tool><tool_input>Input1\
</tool_input><observation>Observation1</observation>"""
    # Assert
    assert result == expected_result

Domain

Subdomains

Frequently Asked Questions

What does test_single_agent_action_observation() do?
test_single_agent_action_observation() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/agents/format_scratchpad/test_xml.py.
Where is test_single_agent_action_observation() defined?
test_single_agent_action_observation() is defined in libs/langchain/tests/unit_tests/agents/format_scratchpad/test_xml.py at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free