Home / Function/ test_retry_output_parser_aparse_with_prompt_fail() — langchain Function Reference

test_retry_output_parser_aparse_with_prompt_fail() — langchain Function Reference

Architecture documentation for the test_retry_output_parser_aparse_with_prompt_fail() function in test_retry.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  d4ec9c63_e78c_9e61_f34b_0a9616fcc1a6["test_retry_output_parser_aparse_with_prompt_fail()"]
  7d3a9c30_27db_60ef_9fa4_456f3a99ca3b["test_retry.py"]
  d4ec9c63_e78c_9e61_f34b_0a9616fcc1a6 -->|defined in| 7d3a9c30_27db_60ef_9fa4_456f3a99ca3b
  style d4ec9c63_e78c_9e61_f34b_0a9616fcc1a6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/output_parsers/test_retry.py lines 82–93

async def test_retry_output_parser_aparse_with_prompt_fail() -> None:
    n: int = 5  # Success on the (n+1)-th attempt
    base_parser = SuccessfulParseAfterRetries(attemp_count_before_success=n)
    parser = RetryOutputParser[str](
        parser=base_parser,
        retry_chain=RunnablePassthrough(),
        max_retries=n - 1,  # n-1 times to retry, that is, n times call
        legacy=False,
    )
    with pytest.raises(OutputParserException):
        await parser.aparse_with_prompt("completion", StringPromptValue(text="dummy"))
    assert base_parser.parse_count == n

Domain

Subdomains

Frequently Asked Questions

What does test_retry_output_parser_aparse_with_prompt_fail() do?
test_retry_output_parser_aparse_with_prompt_fail() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/output_parsers/test_retry.py.
Where is test_retry_output_parser_aparse_with_prompt_fail() defined?
test_retry_output_parser_aparse_with_prompt_fail() is defined in libs/langchain/tests/unit_tests/output_parsers/test_retry.py at line 82.

Analyze Your Own Codebase

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

Try Supermodel Free