Home / Function/ update() — langchain Function Reference

update() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  9a2cabcb_0298_fe46_eeb9_77e538307565["update()"]
  cc7bb185_d3e3_eb58_9979_a81c90c9cc33["RecordManager"]
  9a2cabcb_0298_fe46_eeb9_77e538307565 -->|defined in| cc7bb185_d3e3_eb58_9979_a81c90c9cc33
  abe5b1d2_7989_73c6_22d5_99489342b630["update()"]
  abe5b1d2_7989_73c6_22d5_99489342b630 -->|calls| 9a2cabcb_0298_fe46_eeb9_77e538307565
  abe5b1d2_7989_73c6_22d5_99489342b630["update()"]
  9a2cabcb_0298_fe46_eeb9_77e538307565 -->|calls| abe5b1d2_7989_73c6_22d5_99489342b630
  style 9a2cabcb_0298_fe46_eeb9_77e538307565 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/indexing/base.py lines 99–124

    def update(
        self,
        keys: Sequence[str],
        *,
        group_ids: Sequence[str | None] | None = None,
        time_at_least: float | None = None,
    ) -> None:
        """Upsert records into the database.

        Args:
            keys: A list of record keys to upsert.
            group_ids: A list of group IDs corresponding to the keys.
            time_at_least: Optional timestamp. Implementation can use this
                to optionally verify that the timestamp IS at least this time
                in the system that stores the data.

                e.g., use to validate that the time in the postgres database
                is equal to or larger than the given timestamp, if not
                raise an error.

                This is meant to help prevent time-drift issues since
                time may not be monotonically increasing!

        Raises:
            ValueError: If the length of keys doesn't match the length of group_ids.
        """

Subdomains

Calls

Called By

Frequently Asked Questions

What does update() do?
update() is a function in the langchain codebase, defined in libs/core/langchain_core/indexing/base.py.
Where is update() defined?
update() is defined in libs/core/langchain_core/indexing/base.py at line 99.
What does update() call?
update() calls 1 function(s): update.
What calls update()?
update() is called by 1 function(s): update.

Analyze Your Own Codebase

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

Try Supermodel Free