Home / Function/ aupdate() — langchain Function Reference

aupdate() — langchain Function Reference

Architecture documentation for the aupdate() function in caches.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ea890aa7_5e0f_70ac_d2f0_6bc39ac36227["aupdate()"]
  4d0ff6e4_41b7_2651_42a4_d1f2735b32e1["InMemoryCache"]
  ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 -->|defined in| 4d0ff6e4_41b7_2651_42a4_d1f2735b32e1
  aa4561f7_6b0b_67c8_1afe_71223099cb3f["aupdate()"]
  aa4561f7_6b0b_67c8_1afe_71223099cb3f -->|calls| ea890aa7_5e0f_70ac_d2f0_6bc39ac36227
  5d456e9b_8125_c661_378a_257f7a88bcf3["update()"]
  ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 -->|calls| 5d456e9b_8125_c661_378a_257f7a88bcf3
  aa4561f7_6b0b_67c8_1afe_71223099cb3f["aupdate()"]
  ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 -->|calls| aa4561f7_6b0b_67c8_1afe_71223099cb3f
  d94616cb_4243_24aa_5cad_1bce1940f0b8["update()"]
  ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 -->|calls| d94616cb_4243_24aa_5cad_1bce1940f0b8
  style ea890aa7_5e0f_70ac_d2f0_6bc39ac36227 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/caches.py lines 253–267

    async def aupdate(
        self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE
    ) -> None:
        """Async update cache based on `prompt` and `llm_string`.

        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.
            return_val: The value to be cached. The value is a list of `Generation`
                (or subclasses).
        """
        self.update(prompt, llm_string, return_val)

Domain

Subdomains

Called By

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 253.
What does aupdate() call?
aupdate() calls 3 function(s): aupdate, update, update.
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