Skip to content

Commit

Permalink
restore old one-line style
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyongchao committed Dec 19, 2024
1 parent bf77195 commit f44c3bd
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions lazyllm/tools/rag/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ def delete_files(self, file_ids: List[str]) -> List[KBDocument]:
return document_list

@abstractmethod
def table_inited(self):
pass
def table_inited(self): pass

@abstractmethod
def _init_tables(self):
pass
def _init_tables(self): pass

@abstractmethod
def list_files(
Expand All @@ -155,12 +153,10 @@ def list_files(
pass

@abstractmethod
def list_all_kb_group(self):
pass
def list_all_kb_group(self): pass

@abstractmethod
def add_kb_group(self, name):
pass
def add_kb_group(self, name): pass

@abstractmethod
def list_kb_group_files(
Expand All @@ -182,12 +178,10 @@ def add_files(self, files: List[str], metadatas: Optional[List[Dict[str, Any]]]
return ids

@abstractmethod
def get_filepaths(self, file_ids: List[str]):
pass
def get_filepaths(self, file_ids: List[str]): pass

@abstractmethod
def delete_obsolete_files(self):
pass
def delete_obsolete_files(self): pass

@abstractmethod
def _add_files(
Expand All @@ -200,8 +194,7 @@ def _add_files(
pass

@abstractmethod
def update_file_message(self, fileid: str, **kw):
pass
def update_file_message(self, fileid: str, **kw): pass

@abstractmethod
def update_file_status_by_cond(
Expand All @@ -210,32 +203,26 @@ def update_file_status_by_cond(
pass

@abstractmethod
def add_files_to_kb_group(self, file_ids: List[str], group: str):
pass
def add_files_to_kb_group(self, file_ids: List[str], group: str): pass

@abstractmethod
def _delete_files(self, file_ids: List[str], real: bool = False):
pass
def _delete_files(self, file_ids: List[str], real: bool = False): pass

@abstractmethod
def delete_files_from_kb_group(self, file_ids: List[str], group: str):
pass
def delete_files_from_kb_group(self, file_ids: List[str], group: str): pass

@abstractmethod
def get_file_status(self, fileid: str):
pass
def get_file_status(self, fileid: str): pass

@abstractmethod
def update_file_status(self, file_ids: List[str], status: str, batch_size: int = 64) -> List[Tuple[str, str]]:
pass
def update_file_status(self, file_ids: List[str], status: str, batch_size: int = 64) -> List[Tuple[str, str]]: pass

@abstractmethod
def update_kb_group_file_status(self, file_ids: Union[str, List[str]], status: str, group: Optional[str] = None):
pass
def update_kb_group_file_status(self, file_ids: Union[str, List[str]],
status: str, group: Optional[str] = None): pass

@abstractmethod
def release(self):
pass
def release(self): pass


class SqliteDocListManager(DocListManager):
Expand Down

0 comments on commit f44c3bd

Please sign in to comment.