Home / Function/ update() — langchain Function Reference

update() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  80823069_d550_b04c_f41c_51d0b981a55a["update()"]
  c7d14f62_2c61_b6b3_ebf0_2331b5ba370e["InMemoryCache"]
  80823069_d550_b04c_f41c_51d0b981a55a -->|defined in| c7d14f62_2c61_b6b3_ebf0_2331b5ba370e
  26955b46_3e61_e2de_bb81_6bc6ca28157a["update()"]
  26955b46_3e61_e2de_bb81_6bc6ca28157a -->|calls| 80823069_d550_b04c_f41c_51d0b981a55a
  26955b46_3e61_e2de_bb81_6bc6ca28157a["update()"]
  80823069_d550_b04c_f41c_51d0b981a55a -->|calls| 26955b46_3e61_e2de_bb81_6bc6ca28157a
  style 80823069_d550_b04c_f41c_51d0b981a55a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/language_models/llms/test_cache.py lines 21–23

    def update(self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE) -> None:
        """Update cache based on `prompt` and `llm_string`."""
        self._cache[prompt, llm_string] = return_val

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does update() do?
update() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/llms/test_cache.py.
Where is update() defined?
update() is defined in libs/core/tests/unit_tests/language_models/llms/test_cache.py at line 21.
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