Create a RetryWithErrorOutputParser from an LLM.
from_llm(
cls,
llm: BaseLanguageModel,
parser: BaseOutputParser[T],
prompt: BasePromptTemplate = NAIVE_RETRY_WITH_ERROR_PROMPT,
max_retries: int = 1
) -> RetryWithErrorOutputParser[T]| Name | Type | Description |
|---|---|---|
llm* | BaseLanguageModel | The LLM to use to retry the completion. |
parser* | BaseOutputParser[T] | The parser to use to parse the output. |
prompt | BasePromptTemplate | Default: NAIVE_RETRY_WITH_ERROR_PROMPTThe prompt to use to retry the completion. |
max_retries | int | Default: 1The maximum number of times to retry the completion. |