langchainjs
langchainjs copied to clipboard
Fix ChatConversationalAgentOutputParser cannot handle markdown in the JSON
The output parser doesn't handle when the AI's action_input contains markdown, or ``` backticks really, as it's matching on the first set of backticks it finds rather than the last.
Tested with yarn test:single langchain/src/agents/tests/chat_output_parser.test.ts
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| langchainjs-docs | ✅ Ready (Inspect) | Visit Preview | Apr 28, 2023 2:01pm |
For the lint, how should I resolve the no-unused-expressions on the tests calling expect?
@micahriggan I've fixed it, it was missing the () for doing the function call
FWIW, I think StructuredOutputParser has the same problem
@NJordan72 agreed, just took a look at that file and it has the same issue.
Anything else I need to do on this one? @nfcampos
Thanks, merging this now. The same issue in StructuredOutputParser is resolved in another PR