langchain
langchain copied to clipboard
core[patch]: Fix JsonOutputParser returns empty json when text ends with "\".
- Issue: Close #20204
- @baskaryan, @efriis, @eyurtsev, @hwchase17.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| langchain | ⬜️ Ignored (Inspect) | Visit Preview | May 15, 2024 2:35pm |
@eyurtsev This is a bug, please take a look, thanks.
@eyurtsev PTAL
@liugddx the unit test I added was meant to illustrate that the current change to the code is incorrect.
This change introduces a bug that mutates the original JSON!
What you can do is restore the original test, and then create a new test that shows the streaming version. In that test, adjust the test case first so that it produces the correct stream and then determine how to update the code correctly so it doesn't mutate the original JSON being streamed and inserts additional \.
closing due to inactivity