patch[Community] Optimize methods in several ChatLoaders (#24806)

There are some static methods in ChatLoaders, try to add @staticmethod
decorator for them.
This commit is contained in:
ZhangShenao
2024-08-23 23:00:41 +08:00
committed by GitHub
parent 644e0d3463
commit b38c83ff93
4 changed files with 14 additions and 7 deletions

View File

@@ -86,7 +86,8 @@ class WhatsAppChatLoader(BaseChatLoader):
logger.debug(f"Could not parse line: {line}")
return ChatSession(messages=results)
def _iterate_files(self, path: str) -> Iterator[str]:
@staticmethod
def _iterate_files(path: str) -> Iterator[str]:
"""Iterate over the files in a directory or zip file.
Args: