Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh1994 committed Oct 14, 2024
1 parent b620df3 commit ec3b4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lazyllm/tools/rag/doc_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _lazy_init(self) -> None:
ids, pathes = self._list_files()
root_nodes = self._reader.load_data(pathes)
self.store.add_nodes(root_nodes)
self._dlm.update_kb_group_file_status(self._kb_group_name, ids, 'success')
if self._dlm: self._dlm.update_kb_group_file_status(self._kb_group_name, ids, 'success')
LOG.debug(f"building {LAZY_ROOT_NAME} nodes: {root_nodes}")

if self._dlm:
Expand Down Expand Up @@ -163,7 +163,7 @@ def worker(self):
time.sleep(10)

def _list_files(self, status: str = 'all') -> Tuple[List[str], List[str]]:
if self._doc_files: return self._doc_files
if self._doc_files: return None, self._doc_files
ids, paths = [], []
for row in self._dlm.list_kb_group_files(group=self._kb_group_name, status=status, details=True):
ids.append(row[0])
Expand Down

0 comments on commit ec3b4ed

Please sign in to comment.