aupdate() — langchain Function Reference
Architecture documentation for the aupdate() function in caches.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD aa4561f7_6b0b_67c8_1afe_71223099cb3f["aupdate()"] 374b7b0c_f4fd_ba00_b93d_1a3cbb3b05cb["BaseCache"] aa4561f7_6b0b_67c8_1afe_71223099cb3f -->|defined in| 374b7b0c_f4fd_ba00_b93d_1a3cbb3b05cb ea890aa7_5e0f_70ac_d2f0_6bc39ac36227["aupdate()"] ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 -->|calls| aa4561f7_6b0b_67c8_1afe_71223099cb3f ea890aa7_5e0f_70ac_d2f0_6bc39ac36227["aupdate()"] aa4561f7_6b0b_67c8_1afe_71223099cb3f -->|calls| ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 style aa4561f7_6b0b_67c8_1afe_71223099cb3f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/caches.py lines 125–148
async def aupdate(
self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE
) -> None:
"""Async update cache based on `prompt` and `llm_string`.
The prompt and llm_string are used to generate a key for the cache.
The key should match that of the look up method.
Args:
prompt: A string representation of the prompt.
In the case of a chat model, the prompt is a non-trivial
serialization of the prompt into the language model.
llm_string: A string representation of the LLM configuration.
This is used to capture the invocation parameters of the LLM
(e.g., model name, temperature, stop tokens, max tokens, etc.).
These invocation parameters are serialized into a string
representation.
return_val: The value to be cached. The value is a list of `Generation`
(or subclasses).
"""
return await run_in_executor(None, self.update, prompt, llm_string, return_val)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does aupdate() do?
aupdate() is a function in the langchain codebase, defined in libs/core/langchain_core/caches.py.
Where is aupdate() defined?
aupdate() is defined in libs/core/langchain_core/caches.py at line 125.
What does aupdate() call?
aupdate() calls 1 function(s): aupdate.
What calls aupdate()?
aupdate() is called by 1 function(s): aupdate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free