test_retry_with_error_output_parser_aparse_with_prompt() — langchain Function Reference
Architecture documentation for the test_retry_with_error_output_parser_aparse_with_prompt() function in test_retry.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 64ddfe63_8467_aba4_494f_9cc1140a5ed7["test_retry_with_error_output_parser_aparse_with_prompt()"] 7d3a9c30_27db_60ef_9fa4_456f3a99ca3b["test_retry.py"] 64ddfe63_8467_aba4_494f_9cc1140a5ed7 -->|defined in| 7d3a9c30_27db_60ef_9fa4_456f3a99ca3b style 64ddfe63_8467_aba4_494f_9cc1140a5ed7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/output_parsers/test_retry.py lines 150–164
async def test_retry_with_error_output_parser_aparse_with_prompt() -> 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, # n times to retry, that is, (n+1) times call
legacy=False,
)
actual = await parser.aparse_with_prompt(
"completion",
StringPromptValue(text="dummy"),
)
assert actual == "parsed"
assert base_parser.parse_count == n + 1
Domain
Subdomains
Source
Frequently Asked Questions
What does test_retry_with_error_output_parser_aparse_with_prompt() do?
test_retry_with_error_output_parser_aparse_with_prompt() 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() defined?
test_retry_with_error_output_parser_aparse_with_prompt() is defined in libs/langchain/tests/unit_tests/output_parsers/test_retry.py at line 150.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free