Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Custom LLM Agent example (#6429)
<!-- Thank you for contributing to LangChain! Your PR will appear in our release under the title you set. Please make sure it highlights your valuable contribution. Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change. After you're done, someone will review your PR. They may suggest improvements. If no one reviews your PR within a few days, feel free to @-mention the same people again, as notifications can get lost. Finally, we'd love to show appreciation for your contribution - if you'd like us to shout you out on Twitter, please also include your handle! --> The `CustomOutputParser` needs to throw `OutputParserException` when it fails to parse the response from the agent, so that the executor can [catch it and retry](https://github.com/hwchase17/langchain/blob/be9371ca8f363bf1c748ac4af7fb4a0d75a365c5/langchain/agents/agent.py#L767) when `handle_parsing_errors=True`. <!-- Remove if not applicable --> #### Who can review? Tag maintainers/contributors who might be interested: @hwchase17 <!-- For a quicker response, figure out the right person to tag with @ @hwchase17 - project lead Tracing / Callbacks - @agola11 Async - @agola11 DataLoaders - @eyurtsev Models - @hwchase17 - @agola11 Agents / Tools / Toolkits - @hwchase17 VectorStores / Retrievers / Memory - @dev2049 -->
- Loading branch information