cleaned code
This commit is contained in:
parent
fd77099af5
commit
61fd3e6127
1 changed files with 3 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ from .utils import (
|
||||||
convert_response_to_json,
|
convert_response_to_json,
|
||||||
logger,
|
logger,
|
||||||
set_logger,
|
set_logger,
|
||||||
statistic_data,
|
statistic_data
|
||||||
)
|
)
|
||||||
from .base import (
|
from .base import (
|
||||||
BaseGraphStorage,
|
BaseGraphStorage,
|
||||||
|
|
@ -31,7 +31,6 @@ from .base import (
|
||||||
from .namespace import NameSpace, make_namespace
|
from .namespace import NameSpace, make_namespace
|
||||||
|
|
||||||
from .prompt import GRAPH_FIELD_SEP
|
from .prompt import GRAPH_FIELD_SEP
|
||||||
|
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
"NetworkXStorage": ".kg.networkx_impl",
|
"NetworkXStorage": ".kg.networkx_impl",
|
||||||
"JsonKVStorage": ".kg.json_kv_impl",
|
"JsonKVStorage": ".kg.json_kv_impl",
|
||||||
|
|
@ -560,8 +559,8 @@ class LightRAG:
|
||||||
"updated_at": datetime.now().isoformat(),
|
"updated_at": datetime.now().isoformat(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
await self.doc_status.upsert({doc_id: doc_status})
|
|
||||||
await self.chunks_vdb.upsert(chunks)
|
await self.chunks_vdb.upsert(chunks)
|
||||||
|
await self.doc_status.upsert({doc_id: doc_status})
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
doc_status.update(
|
doc_status.update(
|
||||||
|
|
@ -621,7 +620,7 @@ class LightRAG:
|
||||||
global_config=asdict(self),
|
global_config=asdict(self),
|
||||||
)
|
)
|
||||||
if maybe_new_kg is None:
|
if maybe_new_kg is None:
|
||||||
logger.info("No entities or relationships extracted!")
|
logger.warning("No entities or relationships extracted!")
|
||||||
# Update status to processed
|
# Update status to processed
|
||||||
await self.text_chunks.upsert(
|
await self.text_chunks.upsert(
|
||||||
{chunk_id: {"status": DocStatus.PROCESSED}}
|
{chunk_id: {"status": DocStatus.PROCESSED}}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue