Skip to content

BUG: Unable to parse the JSON schema for LlamaIndex when there is a space in dictionary key #150

Open
@prabhupant

Description

@prabhupant

The below code throws error when this schema is passed in LlamaIndex's JSONQueryEngine. The error occurs because the key Issue id has a space in between. Tried this after removing the space with underscore and it worked

json_schema = {
    "description": "Schema defining the jira tickets and their related data",
    "type": "object",
    "properties": {
        "issues": {
            "description": "List of Jira tickets with their related data",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "Summary": {
                        "description": "Summary of an issue",
                        "type": "string"
                    },
                    "Issue id": {
                        "description": "Issue id of an issue",
                        "type": "integer"
                    }
                }, 
            }
        }
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions