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

Add the CorrectRepairStrategy mode. #7

Open
HAibiiin opened this issue Jan 18, 2025 · 0 comments
Open

Add the CorrectRepairStrategy mode. #7

HAibiiin opened this issue Jan 18, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@HAibiiin
Copy link
Owner

Repairs are performed based on the JSON sample format provided to LLMs. It is equivalent to using the sample JSON as a reference to repair abnormal JSON, which can fix more abnormal issues and provide better repair accuracy at the same time.

public class CorrectRepairStrategy implements RepairStrategy {
    public CorrectRepairStrategy(String correctJSONRef) {
        //...
    }
}

JSONRepair repair = new JSONRepair(new CorrectRepairStrategy("{}"));

基于给 LLMs 提供的 JSON 样例格式进行修复,相当于面对异常 JSON 以样例 JSON 作为参考进行修复,可以修复更多的异常问题,同时提供更好的修复精度。

@HAibiiin HAibiiin added the enhancement New feature or request label Jan 18, 2025
@HAibiiin HAibiiin added this to the 0.3.0 milestone Jan 18, 2025
@HAibiiin HAibiiin self-assigned this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant