-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor: switch from JSON to XML format for tool operations #747
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
Conversation
|
|
Instead of full XML conversion, consider:
|
@wwicak thanks for you comment, but
|
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we do any escaping of the XML content? What will happen if we try to replace the term </search>?
src/utils/xml.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrubens this config to escape xml content
src/core/Cline.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrubens i will pass to it like this
[
"operation.search",
"operation.replace",
"operation.regex_flags",
]
|
@mrubens anything i should do for this o.o |
|
the problem with using XML is that some smaller language model are not good with XML, but good with JSON, would it be worth allow for different options? |
@bramburn i was thinking that an option we can change how Roo use tool ( via tool use, via xml, via json ... ) |
|
That's another pr. Probably will take weeks |
|
Ive been working on something in the background. Using retry parsers and it
doesn't matter if it's XML or JSON.
It is a discussion we are having in discord. The tools uses json is
required because of claude
…On Mon, 10 Feb 2025, 19:40 Sam Hoang Van, ***@***.***> wrote:
the problem with using XML is that some smaller language model are not
good with XML, but good with JSON, would it be worth allow for different
options?
@bramburn <https://github.com/bramburn> i was thinking that an option we
can change how Roo use tool ( via tool use, via xml, via json ... )
what is your thoughts about that ?
—
Reply to this email directly, view it on GitHub
<#747 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUTT3IQZP35A6D265I7ZOD2PD6DXAVCNFSM6AAAAABWLMTL4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBZGA3DCOJQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
c2dc9ad to
f387832
Compare
…ols to support XML format for operations
f387832 to
3760369
Compare
Description
Motivation: LLM is bad at generate JSON https://aider.chat/2024/08/14/code-in-json.html
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Refactor code to switch from JSON to XML format for tool operations, updating parsing and tool descriptions accordingly.
Cline.ts, affectinginsert-contentandsearch-and-replacetools.Cline.tsto parse operations as XML usingparseXml().parseXml()function inxml.tsfor XML parsing.fast-xml-parserdependency inpackage.json.insert-content.tsandsearch-and-replace.tsto reflect XML format in tool descriptions.This description was created by
for 177b5eb6d962aa40bdb6f5f4becc463e85f97728. It will automatically update as commits are pushed.