mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
use file_paths instead of file_path
This commit is contained in:
@@ -14,7 +14,7 @@ class BaseFileKnowledgeSource(BaseKnowledgeSource, ABC):
|
|||||||
"""Base class for knowledge sources that load content from files."""
|
"""Base class for knowledge sources that load content from files."""
|
||||||
|
|
||||||
_logger: Logger = Logger(verbose=True)
|
_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"
|
..., description="The path to the file"
|
||||||
)
|
)
|
||||||
content: Dict[Path, str] = Field(init=False, default_factory=dict)
|
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]:
|
def _process_file_paths(self) -> List[Path]:
|
||||||
"""Convert file_path to a list of Path objects."""
|
"""Convert file_path to a list of Path objects."""
|
||||||
paths = (
|
paths = (
|
||||||
[self.file_path]
|
[self.file_paths]
|
||||||
if isinstance(self.file_path, (str, Path))
|
if isinstance(self.file_paths, (str, Path))
|
||||||
else self.file_path
|
else self.file_paths
|
||||||
)
|
)
|
||||||
|
|
||||||
if not isinstance(paths, list):
|
if not isinstance(paths, list):
|
||||||
|
|||||||
Reference in New Issue
Block a user