langchain
fd99f3c4 - Improve PlanningOutputParser whitespace handling (#5143)

Commit
2 years ago
Improve PlanningOutputParser whitespace handling (#5143) Some LLM's will produce numbered lists with leading whitespace, i.e. in response to "What is the sum of 2 and 3?": ``` Plan: 1. Add 2 and 3. 2. Given the above steps taken, please respond to the users original question. ``` This commit updates the PlanningOutputParser regex to ignore leading whitespace before the step number, enabling it to correctly parse this format.
Author
Committer
Parents
Loading