test_retry_with_error_output_parser_aparse_with_prompt_fail() — langchain Function Reference
Architecture documentation for the test_retry_with_error_output_parser_aparse_with_prompt_fail() function in test_retry.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7a66e594_3f00_0e08_d7ba_ef2ee26756ae["test_retry_with_error_output_parser_aparse_with_prompt_fail()"] 7d3a9c30_27db_60ef_9fa4_456f3a99ca3b["test_retry.py"] 7a66e594_3f00_0e08_d7ba_ef2ee26756ae -->|defined in| 7d3a9c30_27db_60ef_9fa4_456f3a99ca3b style 7a66e594_3f00_0e08_d7ba_ef2ee26756ae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/output_parsers/test_retry.py lines 167–178
async def test_retry_with_error_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 = RetryWithErrorOutputParser[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
Source
Frequently Asked Questions
What does test_retry_with_error_output_parser_aparse_with_prompt_fail() do?
test_retry_with_error_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_with_error_output_parser_aparse_with_prompt_fail() defined?
test_retry_with_error_output_parser_aparse_with_prompt_fail() is defined in libs/langchain/tests/unit_tests/output_parsers/test_retry.py at line 167.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free