Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EfrosIonelu
Copy link

…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)

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 17, 2025
Copy link

vercel bot commented Feb 17, 2025

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

Name Status Preview Comments Updated (UTC)
langchainjs-docs ❌ Failed (Inspect) Mar 4, 2025 10:03am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Mar 4, 2025 10:03am

@dosubot dosubot bot added the auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs label Feb 17, 2025
@jacoblee93
Copy link
Collaborator

Thanks for this!

Could you add an integration test where this was failing?

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 19, 2025
@EfrosIonelu
Copy link
Author

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

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs lgtm PRs that are ready to be merged as-is size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants