Home / Function/ test_custom_prefixes() — langchain Function Reference

test_custom_prefixes() — langchain Function Reference

Architecture documentation for the test_custom_prefixes() function in test_log.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ae252213_2a10_7099_02c8_660e16710577["test_custom_prefixes()"]
  60c70288_7962_a47f_d9f2_01467def64c3["test_log.py"]
  ae252213_2a10_7099_02c8_660e16710577 -->|defined in| 60c70288_7962_a47f_d9f2_01467def64c3
  style ae252213_2a10_7099_02c8_660e16710577 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/agents/format_scratchpad/test_log.py lines 26–36

def test_custom_prefixes() -> None:
    intermediate_steps = [
        (AgentAction(tool="Tool1", tool_input="input1", log="Log1"), "Observation1"),
    ]
    observation_prefix = "Custom Observation: "
    llm_prefix = "Custom Thought: "
    expected_result = "Log1\nCustom Observation: Observation1\nCustom Thought: "
    assert (
        format_log_to_str(intermediate_steps, observation_prefix, llm_prefix)
        == expected_result
    )

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free