Skip to content

Commit

Permalink
Fix the cache_skip param don't take effect
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG committed Apr 10, 2023
1 parent 9a2d02e commit 35861b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gptcache/adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ def adapt(llm_handler, cache_data_convert, update_cache_callback, *args, **kwarg
pre_embedding_data = chat_cache.pre_embedding_func(
kwargs, extra_param=context.get("pre_embedding_func", None)
)
if cache_enable and not cache_skip:
if cache_enable:
embedding_data = time_cal(
chat_cache.embedding_func,
func_name="embedding",
report_func=chat_cache.report.embedding,
)(pre_embedding_data, extra_param=context.get("embedding_func", None))
if cache_enable and not cache_skip:
cache_data_list = time_cal(
chat_cache.data_manager.search,
func_name="search",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def parse_requirements(file_name: str) -> List[str]:
setuptools.setup(
name="gptcache",
packages=find_packages(),
version="0.1.6",
version="0.1.7",
author="SimFG",
author_email="bang.fu@zilliz.com",
description="GPT Cache, a powerful caching library that can be used to speed up and lower the cost of chat "
Expand Down

0 comments on commit 35861b7

Please sign in to comment.