Fix linting

This commit is contained in:
yangdx
2025-02-13 04:12:00 +08:00
parent d25386ff1b
commit ed73ea4076
11 changed files with 64 additions and 30 deletions

View File

@@ -1,6 +1,5 @@
import asyncio
import json
import os
import re
from tqdm.asyncio import tqdm as tqdm_async
from typing import Any, Union
@@ -35,7 +34,6 @@ from .prompt import GRAPH_FIELD_SEP, PROMPTS
import time
def chunking_by_token_size(
content: str,
split_by_character: Union[str, None] = None,
@@ -1057,7 +1055,9 @@ async def _get_node_data(
query_param: QueryParam,
):
# get similar entities
logger.info(f"Query nodes: {query}, top_k: {query_param.top_k}, cosine: {entities_vdb.cosine_better_than_threshold}")
logger.info(
f"Query nodes: {query}, top_k: {query_param.top_k}, cosine: {entities_vdb.cosine_better_than_threshold}"
)
results = await entities_vdb.query(query, top_k=query_param.top_k)
if not len(results):
return "", "", ""
@@ -1273,7 +1273,9 @@ async def _get_edge_data(
text_chunks_db: BaseKVStorage,
query_param: QueryParam,
):
logger.info(f"Query edges: {keywords}, top_k: {query_param.top_k}, cosine: {relationships_vdb.cosine_better_than_threshold}")
logger.info(
f"Query edges: {keywords}, top_k: {query_param.top_k}, cosine: {relationships_vdb.cosine_better_than_threshold}"
)
results = await relationships_vdb.query(keywords, top_k=query_param.top_k)
if not len(results):