test_output_fixing_parser_parse_with_retry_chain() — langchain Function Reference
Architecture documentation for the test_output_fixing_parser_parse_with_retry_chain() function in test_fix.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f4c18f6c_6acf_24e7_9a97_d9361bbfeeb4["test_output_fixing_parser_parse_with_retry_chain()"] c258f556_69a4_6da1_fc5d_59387eebb185["test_fix.py"] f4c18f6c_6acf_24e7_9a97_d9361bbfeeb4 -->|defined in| c258f556_69a4_6da1_fc5d_59387eebb185 91f374c8_158e_4139_b9a3_93eea5b99094["get_format_instructions()"] f4c18f6c_6acf_24e7_9a97_d9361bbfeeb4 -->|calls| 91f374c8_158e_4139_b9a3_93eea5b99094 7945a061_0780_564e_7244_45c17f5845a0["parse()"] f4c18f6c_6acf_24e7_9a97_d9361bbfeeb4 -->|calls| 7945a061_0780_564e_7244_45c17f5845a0 style f4c18f6c_6acf_24e7_9a97_d9361bbfeeb4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/output_parsers/test_fix.py lines 171–186
def test_output_fixing_parser_parse_with_retry_chain(
completion: str,
base_parser: BaseOutputParser[T],
retry_chain: Runnable[dict[str, Any], str],
expected: T,
) -> None:
# NOTE: get_format_instructions of some parsers behave randomly
instructions = base_parser.get_format_instructions()
object.__setattr__(base_parser, "get_format_instructions", lambda: instructions)
# test
parser = OutputFixingParser[str](
parser=base_parser,
retry_chain=retry_chain,
legacy=False,
)
assert parser.parse(completion) == expected
Domain
Subdomains
Source
Frequently Asked Questions
What does test_output_fixing_parser_parse_with_retry_chain() do?
test_output_fixing_parser_parse_with_retry_chain() 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_parse_with_retry_chain() defined?
test_output_fixing_parser_parse_with_retry_chain() is defined in libs/langchain/tests/unit_tests/output_parsers/test_fix.py at line 171.
What does test_output_fixing_parser_parse_with_retry_chain() call?
test_output_fixing_parser_parse_with_retry_chain() calls 2 function(s): get_format_instructions, parse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free