Fix linting

This commit is contained in:
yangdx
2025-02-02 04:27:55 +08:00
parent ecf48a5be5
commit 0a693dbfda
2 changed files with 5 additions and 3 deletions

View File

@@ -368,7 +368,9 @@ async def get_best_cached_response(
original_prompt=None,
cache_type=None,
) -> Union[str, None]:
logger.debug(f"get_best_cached_response: mode={mode} cache_type={cache_type} use_llm_check={use_llm_check}")
logger.debug(
f"get_best_cached_response: mode={mode} cache_type={cache_type} use_llm_check={use_llm_check}"
)
mode_cache = await hashing_kv.get_by_id(mode)
if not mode_cache:
return None
@@ -511,7 +513,7 @@ async def handle_cache(
if is_embedding_cache_enabled:
# Use embedding cache
current_embedding = await hashing_kv.embedding_func([prompt])
llm_model_func = hashing_kv.global_config.get('llm_model_func')
llm_model_func = hashing_kv.global_config.get("llm_model_func")
quantized, min_val, max_val = quantize_embedding(current_embedding[0])
best_cached_response = await get_best_cached_response(
hashing_kv,