Skip to content

When creating a Graph document Node, some types are missing #34

Open
@alexismenanieves

Description

@alexismenanieves

I have this definition:

from langchain_community.graphs.graph_document import (
    GraphDocument, Node, Relationship
)

node_list = [('8,650 Btu', 'Node'), ('SO emissions limit', 'Emission Limit'), ('0.03 lb/MMBtu of dry coal feed', 'Node')]
nodes = [Node(id=el[0], type=el[1], properties={'name':el[0], 'type':el[1]}) for el in node_list]

But it returns:

[Node(id='8,650 Btu', properties={'name': '8,650 Btu', 'type': 'Node'}),
 Node(id='SO emissions limit', type='Emission Limit', properties={'name': 'SO emissions limit', 'type': 'Emission Limit'}),
 Node(id='0.03 lb/MMBtu of dry coal feed', properties={'name': '0.03 lb/MMBtu of dry coal feed', 'type': 'Node'})]

The first and last node have 'type' missing. Is that an expected feature of Node?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions