From a67ec7e37a62d91cb83d5ecc47333c9ee0ea08cb Mon Sep 17 00:00:00 2001 From: Lorenze Jay Date: Sun, 15 Dec 2024 22:21:19 -0800 Subject: [PATCH] use file_paths instead of file_path --- src/crewai/knowledge/source/base_file_knowledge_source.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crewai/knowledge/source/base_file_knowledge_source.py b/src/crewai/knowledge/source/base_file_knowledge_source.py index ae9b3bf71..24dd4a3f2 100644 --- a/src/crewai/knowledge/source/base_file_knowledge_source.py +++ b/src/crewai/knowledge/source/base_file_knowledge_source.py @@ -14,7 +14,7 @@ class BaseFileKnowledgeSource(BaseKnowledgeSource, ABC): """Base class for knowledge sources that load content from files.""" _logger: Logger = Logger(verbose=True) - file_path: Union[Path, List[Path], str, List[str]] = Field( + file_paths: Union[Path, List[Path], str, List[str]] = Field( ..., description="The path to the file" ) content: Dict[Path, str] = Field(init=False, default_factory=dict) @@ -60,9 +60,9 @@ class BaseFileKnowledgeSource(BaseKnowledgeSource, ABC): def _process_file_paths(self) -> List[Path]: """Convert file_path to a list of Path objects.""" paths = ( - [self.file_path] - if isinstance(self.file_path, (str, Path)) - else self.file_path + [self.file_paths] + if isinstance(self.file_paths, (str, Path)) + else self.file_paths ) if not isinstance(paths, list):