OmniParser
OmniParser copied to clipboard
Failed to parse json response of LLM
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.
maybe using https://pypi.org/project/json5/
Or https://github.com/mangiucugna/json_repair/