Skip to content

RetrievedContext

Source code in docs_src/capo_context/types/retrieved_context.py
class RetrievedContext(TypedDict, closed=True):
    node_id: NotRequired["capo_context.types.generic_node_id.GenericNodeId"]
    """<p>Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).</p>"""
    edge_id: NotRequired["capo_context.types.edge_identifier.EdgeIdentifier"]
    """<p>Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).</p>"""
    document_id: NotRequired[
        "capo_context.types.retrieved_document_id.RetrievedDocumentId"
    ]
    """<p>Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).</p>"""
    entity_type: (
        "capo_context.types.retrieved_context_entity_type.RetrievedContextEntityType"
    )
    """<p>Specifies whether this result is a node, an edge, or a document. Valid values:</p> <ul> <li> <p> <code>NODE</code> - The result is a node.</p> </li> <li> <p> <code>EDGE</code> - The result is an edge.</p> </li> <li> <p> <code>DOCUMENT</code> - The result is a document.</p> </li> </ul>"""
    summary: NotRequired["capo_context.types.entity_summary.EntitySummary"]
    """<p>Human-readable description or summary of the entity.</p>"""
    content: NotRequired[
        "capo_context.types.retrieved_context_content.RetrievedContextContent"
    ]
    """<p>The retrieved content of the entity.</p>"""
    properties: NotRequired["capo_context.types.metadata.Metadata"]
    """<p>Arbitrary key-value properties stored on the entity.</p>"""

content instance-attribute

content: NotRequired[RetrievedContextContent]

The retrieved content of the entity.

document_id instance-attribute

document_id: NotRequired[RetrievedDocumentId]

Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).

edge_id instance-attribute

edge_id: NotRequired[EdgeIdentifier]

Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).

entity_type instance-attribute

Specifies whether this result is a node, an edge, or a document. Valid values:

  • NODE - The result is a node.

  • EDGE - The result is an edge.

  • DOCUMENT - The result is a document.

node_id instance-attribute

node_id: NotRequired[GenericNodeId]

Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).

properties instance-attribute

properties: NotRequired[Metadata]

Arbitrary key-value properties stored on the entity.

summary instance-attribute

summary: NotRequired[EntitySummary]

Human-readable description or summary of the entity.