fix naive_query
This commit is contained in:
@@ -616,6 +616,7 @@ async def jina_embedding(
|
||||
data_list = await fetch_data(url, headers, data)
|
||||
return np.array([dp["embedding"] for dp in data_list])
|
||||
|
||||
|
||||
@wrap_embedding_func_with_attrs(embedding_dim=2048, max_token_size=512)
|
||||
@retry(
|
||||
stop=stop_after_attempt(3),
|
||||
|
@@ -1103,7 +1103,6 @@ async def naive_query(
|
||||
response = await use_model_func(
|
||||
query,
|
||||
system_prompt=sys_prompt,
|
||||
mode=query_param.mode,
|
||||
)
|
||||
|
||||
if len(response) > len(sys_prompt):
|
||||
|
@@ -383,7 +383,7 @@ async def get_best_cached_response(
|
||||
except Exception as e: # Catch all possible exceptions
|
||||
logger.warning(f"LLM similarity check failed: {e}")
|
||||
return None # Return None directly when LLM check fails
|
||||
|
||||
|
||||
prompt_display = (
|
||||
best_prompt[:50] + "..." if len(best_prompt) > 50 else best_prompt
|
||||
)
|
||||
|
Reference in New Issue
Block a user