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

Silent JSON parsing errors in the app #80

Closed
caufieldjh opened this issue Sep 9, 2024 · 1 comment · Fixed by #82
Closed

Silent JSON parsing errors in the app #80

caufieldjh opened this issue Sep 9, 2024 · 1 comment · Fixed by #82
Assignees

Comments

@caufieldjh
Copy link
Member

caufieldjh commented Sep 9, 2024

Some JSON parsing errors yield empty results in the app but don't raise an error, so it's unclear to the user what happened.

For example, when running the Extract function with a database of VBO and sending the string "The Zwartbles is a breed of sheep." to GPT-4o with no background generation, the error on the command line is this:

Could not parse ```json
{
  "id": "Zwartbles_Sheep_",
  "label": "Zwartbles (Sheep)",
  "definition": null,
  "aliases": null,
  "relationships": [
    {
      "predicate": "subClassOf",
      "target": "IndependentContinuant"
    },
    {
      "predicate": "subClassOf",
      "target": "SheepBreed"
    }
  ],
  "logical_definition": null,
  "original_id": "VBO:0010001"
}

But the extracted object is empty ( {}).

@caufieldjh caufieldjh self-assigned this Sep 11, 2024
@caufieldjh
Copy link
Member Author

Ah, I thought I had fixed this before, but #54 only fixes the MappingAgent, not any of the extraction functions. So the JSON/Markdown processing should probably be more of a general utility.

@caufieldjh caufieldjh linked a pull request Sep 11, 2024 that will close this issue
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 a pull request may close this issue.

1 participant