microsoft / microsoft/OmniParser

Failed to parse json response of LLM

Open
#259 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
25.4k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes

{
    "Reasoning": "The current screen shows the  login page with the username and password fields filled. The 'Please wait...' message indicates that the system is processing the login request. Therefore, the next step should be to wait for the login process to complete.",
    "Next Action": "wait",
}

This is a format issue. There is a unexpected comma at end of the json string.
The issue doesn't happen frequently. But sometimes.
Of course, this should be fixed by LLM.
I just think it would be better if OmniParser can be enhanced to ignore some json issues like this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the OmniParser entry point that parses the LLM JSON response and reproduce the trailing-comma example shown in the issue. Check how JSONDecodeError is handled, then add coverage for this malformed response; done means the response is handled without an uncaught parsing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.