Fix linting
This commit is contained in:
@@ -672,6 +672,7 @@ def get_api_key_dependency(api_key: Optional[str]):
|
|||||||
# Global configuration
|
# Global configuration
|
||||||
global_top_k = 60 # default value
|
global_top_k = 60 # default value
|
||||||
|
|
||||||
|
|
||||||
def create_app(args):
|
def create_app(args):
|
||||||
global global_top_k
|
global global_top_k
|
||||||
global_top_k = args.top_k # save top_k from args
|
global_top_k = args.top_k # save top_k from args
|
||||||
|
@@ -416,7 +416,13 @@ async def get_best_cached_response(
|
|||||||
|
|
||||||
if best_similarity > similarity_threshold:
|
if best_similarity > similarity_threshold:
|
||||||
# If LLM check is enabled and all required parameters are provided
|
# If LLM check is enabled and all required parameters are provided
|
||||||
if use_llm_check and llm_func and original_prompt and best_prompt and best_response is not None:
|
if (
|
||||||
|
use_llm_check
|
||||||
|
and llm_func
|
||||||
|
and original_prompt
|
||||||
|
and best_prompt
|
||||||
|
and best_response is not None
|
||||||
|
):
|
||||||
compare_prompt = PROMPTS["similarity_check"].format(
|
compare_prompt = PROMPTS["similarity_check"].format(
|
||||||
original_prompt=original_prompt, cached_prompt=best_prompt
|
original_prompt=original_prompt, cached_prompt=best_prompt
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user