style: ruff-format
This commit is contained in:
parent
b860ffe510
commit
24cb11f3f5
2 changed files with 5 additions and 10 deletions
|
|
@ -164,9 +164,7 @@ class ChromaVectorDBStorage(BaseVectorStorage):
|
|||
logger.error(f"Error during ChromaDB upsert: {str(e)}")
|
||||
raise
|
||||
|
||||
async def query(
|
||||
self, query: str, top_k: int
|
||||
) -> list[dict[str, Any]]:
|
||||
async def query(self, query: str, top_k: int) -> list[dict[str, Any]]:
|
||||
try:
|
||||
embedding = await self.embedding_func(
|
||||
[query], _priority=5
|
||||
|
|
|
|||
|
|
@ -1036,9 +1036,7 @@ class PostgreSQLDB:
|
|||
AND table_schema = 'public'
|
||||
"""
|
||||
params = {"table_name": table_name.lower()}
|
||||
table_exists = await self.query(
|
||||
check_table_sql, list(params.values())
|
||||
)
|
||||
table_exists = await self.query(check_table_sql, list(params.values()))
|
||||
|
||||
if not table_exists:
|
||||
logger.info(f"Creating table {table_name}")
|
||||
|
|
@ -3175,7 +3173,6 @@ class PGGraphStorage(BaseGraphStorage):
|
|||
return result[node_id]
|
||||
|
||||
async def edge_degree(self, src_id: str, tgt_id: str) -> int:
|
||||
|
||||
result = await self.edge_degrees_batch(edges=[(src_id, tgt_id)])
|
||||
if result and (src_id, tgt_id) in result:
|
||||
return result[(src_id, tgt_id)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue