Home / Function/ test_output_fixing_parser_from_llm() — langchain Function Reference

test_output_fixing_parser_from_llm() — langchain Function Reference

Architecture documentation for the test_output_fixing_parser_from_llm() function in test_fix.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  f4377c71_5821_7138_095b_7c1ab43b1d44["test_output_fixing_parser_from_llm()"]
  c258f556_69a4_6da1_fc5d_59387eebb185["test_fix.py"]
  f4377c71_5821_7138_095b_7c1ab43b1d44 -->|defined in| c258f556_69a4_6da1_fc5d_59387eebb185
  7945a061_0780_564e_7244_45c17f5845a0["parse()"]
  f4377c71_5821_7138_095b_7c1ab43b1d44 -->|calls| 7945a061_0780_564e_7244_45c17f5845a0
  style f4377c71_5821_7138_095b_7c1ab43b1d44 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/output_parsers/test_fix.py lines 66–79

def test_output_fixing_parser_from_llm() -> None:
    def fake_llm(_: str) -> AIMessage:
        return AIMessage("2024-07-08T00:00:00.000000Z")

    llm = RunnableLambda(fake_llm)

    n = 1
    parser = OutputFixingParser.from_llm(
        llm=llm,
        parser=DatetimeOutputParser(),
        max_retries=n,
    )

    assert parser.parse("not a date")

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_output_fixing_parser_from_llm() do?
test_output_fixing_parser_from_llm() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/output_parsers/test_fix.py.
Where is test_output_fixing_parser_from_llm() defined?
test_output_fixing_parser_from_llm() is defined in libs/langchain/tests/unit_tests/output_parsers/test_fix.py at line 66.
What does test_output_fixing_parser_from_llm() call?
test_output_fixing_parser_from_llm() calls 1 function(s): parse.

Analyze Your Own Codebase

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

Try Supermodel Free