forked from Archives/langchain
FIX: GPTCache cache_obj creation loop (#4827)
_get_gptcache method keep creating new gptcache instance, here's the fix # Fix GPTCache cache_obj creation loop Fixes #4830 Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
parent
c9e2a01875
commit
a8ded21b69
@ -341,6 +341,8 @@ class GPTCache(BaseCache):
|
||||
pre_embedding_func=get_prompt,
|
||||
data_manager=get_data_manager(data_path=llm_string),
|
||||
)
|
||||
|
||||
self.gptcache_dict[llm_string] = _gptcache
|
||||
return _gptcache
|
||||
|
||||
def _get_gptcache(self, llm_string: str) -> Any:
|
||||
|
Loading…
Reference in New Issue
Block a user