langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
93.99k stars 15.15k forks source link

DOC: Running Output-fixing parser example code results in an error #24600

Open skydowx opened 3 months ago

skydowx commented 3 months ago

URL

https://python.langchain.com/v0.2/docs/how_to/output_parser_fixing/

Checklist

Issue with current documentation:

I was running the code in the "How to use the output-fixing parser" page. After running the last line of code new_parser.parse(misformatted) instead of fixing it and returning the correct output, it gives an error:

ValidationError: 1 validation error for Generation
text
  str type expected (type=type_error.str)

Idea or request for content:

No response

scribu commented 3 months ago

Just created a quick PR that should fix the issue: https://github.com/langchain-ai/langchain/pull/24687