langchainjs icon indicating copy to clipboard operation
langchainjs copied to clipboard

feat: react agent parser is replacing all '"' - in the text and this …

Open EfrosIonelu opened this issue 10 months ago • 3 comments

…is incorrect, we can not parse a json

Fixes # (issue)

E.g.

console.log('"hello world"'.replace(/^"|"$/g, "")); // Output: hello world console.log('"hello "world" "'.replace(/^"|"$/g, "")); // Output: hello "world" console.log('"hello"world"'.replace(/^"|"$/g, "")); // Output: hello"world console.log('hello world'.replace(/^"|"$/g, "")); // Output: hello world (unchanged)

EfrosIonelu avatar Feb 17 '25 06:02 EfrosIonelu

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs 🛑 Canceled (Inspect) Apr 28, 2025 11:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Apr 28, 2025 11:12am

vercel[bot] avatar Feb 17 '25 06:02 vercel[bot]

Thanks for this!

Could you add an integration test where this was failing?

jacoblee93 avatar Feb 18 '25 02:02 jacoblee93

Thanks for this!

Could you add an integration test where this was failing?

@jacoblee93 i added langchain/src/tests/react_agent_output_parser.test.ts

EfrosIonelu avatar Feb 19 '25 06:02 EfrosIonelu

Thanks for the contribution @EfrosIonelu, and sorry it took so long to get it merged!

benjamincburns avatar Apr 28 '25 11:04 benjamincburns