test_output_fixing_parser_parse() — langchain Function Reference
Architecture documentation for the test_output_fixing_parser_parse() function in test_fix.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1ef5c097_ac52_4060_f3a8_ae2a958f22bc["test_output_fixing_parser_parse()"] c258f556_69a4_6da1_fc5d_59387eebb185["test_fix.py"] 1ef5c097_ac52_4060_f3a8_ae2a958f22bc -->|defined in| c258f556_69a4_6da1_fc5d_59387eebb185 7945a061_0780_564e_7244_45c17f5845a0["parse()"] 1ef5c097_ac52_4060_f3a8_ae2a958f22bc -->|calls| 7945a061_0780_564e_7244_45c17f5845a0 style 1ef5c097_ac52_4060_f3a8_ae2a958f22bc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/output_parsers/test_fix.py lines 48–63
def test_output_fixing_parser_parse(
base_parser: SuccessfulParseAfterRetries,
) -> None:
# preparation
n: int = base_parser.attemp_count_before_success # Success on the (n+1)-th attempt
base_parser = SuccessfulParseAfterRetries(attemp_count_before_success=n)
parser = OutputFixingParser[str](
parser=base_parser,
max_retries=n, # n times to retry, that is, (n+1) times call
retry_chain=RunnablePassthrough(),
legacy=False,
)
# test
assert parser.parse("completion") == "parsed"
assert base_parser.parse_count == n + 1
# TODO: test whether "instructions" is passed to the retry_chain
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does test_output_fixing_parser_parse() do?
test_output_fixing_parser_parse() 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() defined?
test_output_fixing_parser_parse() is defined in libs/langchain/tests/unit_tests/output_parsers/test_fix.py at line 48.
What does test_output_fixing_parser_parse() call?
test_output_fixing_parser_parse() 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