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

Removing incorrect end comma in jsonStructure for POJO extracting AI Services #894

Merged
merged 2 commits into from Apr 7, 2024

Conversation

LizeRaes
Copy link
Collaborator

@LizeRaes LizeRaes commented Apr 7, 2024

Context

I noted that for more complex POJO object, the JSON returned by the LLM often contained a last comma before closing bracket, making the JSON invalid and resulting in an error while parsing it. I traced it back to the proposed jsonStructure that is part of the SystemMessage, sending a wrong format to the LLM.

Change

Removed the last comma that shouldn't be there in the jsonStructure + updated the unit tests

@LizeRaes LizeRaes requested a review from Shastick April 7, 2024 16:49
@LizeRaes LizeRaes merged commit a4e82af into langchain4j:main Apr 7, 2024
6 checks passed
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.

None yet

3 participants