Home / Function/ _adelete() — langchain Function Reference

_adelete() — langchain Function Reference

Architecture documentation for the _adelete() function in api.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  644340dd_43ec_9052_f7ff_84c850a4fef1["_adelete()"]
  203188c0_72d6_6932_bc21_edf25c4c00ef["api.py"]
  644340dd_43ec_9052_f7ff_84c850a4fef1 -->|defined in| 203188c0_72d6_6932_bc21_edf25c4c00ef
  02b67c59_d093_f33d_633c_d77332eb191e["aindex()"]
  02b67c59_d093_f33d_633c_d77332eb191e -->|calls| 644340dd_43ec_9052_f7ff_84c850a4fef1
  style 644340dd_43ec_9052_f7ff_84c850a4fef1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/indexing/api.py lines 607–626

async def _adelete(
    vector_store: VectorStore | DocumentIndex,
    ids: list[str],
) -> None:
    if isinstance(vector_store, VectorStore):
        delete_ok = await vector_store.adelete(ids)
        if delete_ok is not None and delete_ok is False:
            msg = "The delete operation to VectorStore failed."
            raise IndexingException(msg)
    elif isinstance(vector_store, DocumentIndex):
        delete_response = await vector_store.adelete(ids)
        if "num_failed" in delete_response and delete_response["num_failed"] > 0:
            msg = "The delete operation to DocumentIndex failed."
            raise IndexingException(msg)
    else:
        msg = (
            f"Vectorstore should be either a VectorStore or a DocumentIndex. "
            f"Got {type(vector_store)}."
        )
        raise TypeError(msg)

Subdomains

Called By

Frequently Asked Questions

What does _adelete() do?
_adelete() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/api.py.
Where is _adelete() defined?
_adelete() is defined in libs/core/langchain_core/indexing/api.py at line 607.
What calls _adelete()?
_adelete() is called by 1 function(s): aindex.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free