🐛 fix(utils.py): fix logger warning message to correctly display the CACHE_TYPE or LANGCHAIN_CACHE variable instead of CACHE variable
This commit is contained in:
parent
e26d61fcfe
commit
f656b71173
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ def setup_llm_caching():
|
||||||
try:
|
try:
|
||||||
set_langchain_cache(settings_manager.settings)
|
set_langchain_cache(settings_manager.settings)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.warning(f"Could not import {settings_manager.settings.CACHE}. ")
|
logger.warning(f"Could not import {settings_manager.settings.CACHE_TYPE}. ")
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.warning(f"Could not setup LLM caching. Error: {exc}")
|
logger.warning(f"Could not setup LLM caching. Error: {exc}")
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ def set_langchain_cache(settings):
|
||||||
|
|
||||||
langchain_cache_type = os.getenv("LANGFLOW_LANGCHAIN_CACHE")
|
langchain_cache_type = os.getenv("LANGFLOW_LANGCHAIN_CACHE")
|
||||||
cache_class = import_class(
|
cache_class = import_class(
|
||||||
f"langchain.cache.{langchain_cache_type or settings.CACHE}"
|
f"langchain.cache.{langchain_cache_type or settings.LANGCHAIN_CACHE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
logger.debug(f"Setting up LLM caching with {cache_class.__name__}")
|
logger.debug(f"Setting up LLM caching with {cache_class.__name__}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue