Skip to content

fix(vision): parse LLM JSON with raw_decode - #687

Open
santhreal wants to merge 6 commits into
HKUDS:devfrom
santhreal:fix/vision-extract-json-raw-decode
Open

fix(vision): parse LLM JSON with raw_decode#687
santhreal wants to merge 6 commits into
HKUDS:devfrom
santhreal:fix/vision-extract-json-raw-decode

Conversation

@santhreal

Copy link
Copy Markdown
Contributor

VisionSolverAgent._extract_json used json.loads, so trailing prose after a JSON object made analysis fall back to {}.

Use JSONDecoder.raw_decode to take the first object from the model response.

VisionSolverAgent._extract_json used json.loads on the whole payload, so
trailing model prose (or a short preface) made analysis return {}.
…son-raw-decode

# Conflicts:
#	deeptutor/skills/builtin/pdf/SKILL.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant