a
    bg                     @  st   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 G dd deZG dd	 d	eZG d
d deZdS )    )annotations)ListUnion)Document)Serializable)Fieldc                   @  s8   e Zd ZU dZded< d Zded< eedZded< d	S )
Nodea,  Represents a node in a graph with associated properties.

    Attributes:
        id (Union[str, int]): A unique identifier for the node.
        type (str): The type or label of the node, default is "Node".
        properties (dict): Additional properties and metadata associated with the node.
    zUnion[str, int]idstrtypedefault_factorydict
propertiesN)	__name__
__module____qualname____doc____annotations__r   r   r   r    r   r   w/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/graphs/graph_document.pyr   
   s   
r   c                   @  s<   e Zd ZU dZded< ded< ded< eedZded	< d
S )RelationshipaS  Represents a directed relationship between two nodes in a graph.

    Attributes:
        source (Node): The source node of the relationship.
        target (Node): The target node of the relationship.
        type (str): The type of the relationship.
        properties (dict): Additional properties associated with the relationship.
    r   sourcetargetr
   r   r   r   r   N)r   r   r   r   r   r   r   r   r   r   r   r   r      s
   
	r   c                   @  s*   e Zd ZU dZded< ded< ded< dS )	GraphDocumenta9  Represents a graph document consisting of nodes and relationships.

    Attributes:
        nodes (List[Node]): A list of nodes in the graph.
        relationships (List[Relationship]): A list of relationships in the graph.
        source (Document): The document from which the graph information is derived.
    z
List[Node]nodeszList[Relationship]Zrelationshipsr   r   N)r   r   r   r   r   r   r   r   r   r   (   s   
r   N)
__future__r   typingr   r   Zlangchain_core.documentsr   Z langchain_core.load.serializabler   Zpydanticr   r   r   r   r   r   r   r   <module>   s   