Home / Function/ delete() — langchain Function Reference

delete() — langchain Function Reference

Architecture documentation for the delete() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  04ec4a1e_0628_adeb_1433_391192581e86["delete()"]
  6c336ac6_f55c_1ad7_6db3_73dbd71fb625["VectorStore"]
  04ec4a1e_0628_adeb_1433_391192581e86 -->|defined in| 6c336ac6_f55c_1ad7_6db3_73dbd71fb625
  style 04ec4a1e_0628_adeb_1433_391192581e86 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/vectorstores/base.py lines 108–120

    def delete(self, ids: list[str] | None = None, **kwargs: Any) -> bool | None:
        """Delete by vector ID or other criteria.

        Args:
            ids: List of IDs to delete. If `None`, delete all.
            **kwargs: Other keyword arguments that subclasses might use.

        Returns:
            `True` if deletion is successful, `False` otherwise, `None` if not
                implemented.
        """
        msg = "delete method must be implemented by subclass."
        raise NotImplementedError(msg)

Subdomains

Frequently Asked Questions

What does delete() do?
delete() is a function in the langchain codebase, defined in libs/core/langchain_core/vectorstores/base.py.
Where is delete() defined?
delete() is defined in libs/core/langchain_core/vectorstores/base.py at line 108.

Analyze Your Own Codebase

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

Try Supermodel Free