MCPcopy
hub / github.com/langchain-ai/langchain / update

Method update

libs/core/langchain_core/indexing/base.py:85–110  ·  view source on GitHub ↗

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

(
        self,
        keys: Sequence[str],
        *,
        group_ids: Optional[Sequence[Optional[str]]] = None,
        time_at_least: Optional[float] = None,
    )

Source from the content-addressed store, hash-verified

83
84 @abstractmethod
85 def update(
86 self,
87 keys: Sequence[str],
88 *,
89 group_ids: Optional[Sequence[Optional[str]]] = None,
90 time_at_least: Optional[float] = None,
91 ) -> None:
92 """Upsert records into the database.
93
94 Args:
95 keys: A list of record keys to upsert.
96 group_ids: A list of group IDs corresponding to the keys.
97 time_at_least: Optional timestamp. Implementation can use this
98 to optionally verify that the timestamp IS at least this time
99 in the system that stores the data.
100
101 e.g., use to validate that the time in the postgres database
102 is equal to or larger than the given timestamp, if not
103 raise an error.
104
105 This is meant to help prevent time-drift issues since
106 time may not be monotonically increasing!
107
108 Raises:
109 ValueError: If the length of keys doesn't match the length of group_ids.
110 """
111
112 @abstractmethod
113 async def aupdate(

Callers 15

_create_llm_runMethod · 0.45
_create_chain_runMethod · 0.45
_create_tool_runMethod · 0.45
_create_retrieval_runMethod · 0.45
on_chat_model_startMethod · 0.45
_get_tagsMethod · 0.45
update_cacheFunction · 0.45
_generate_with_cacheMethod · 0.45
add_metadataMethod · 0.45
indexFunction · 0.45
ensure_configFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected