You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Validate that at least one of file_path or file_paths is provided."""
31
30
# Single check if both are None, O(1) instead of nested conditions
32
31
if (
@@ -46,9 +45,8 @@ def model_post_init(self, _):
46
45
self.content=self.load_content()
47
46
48
47
@abstractmethod
49
-
defload_content(self) ->Dict[Path, str]:
48
+
defload_content(self) ->dict[Path, str]:
50
49
"""Load and preprocess file content. Should be overridden by subclasses. Assume that the file path is relative to the project root in the knowledge directory."""
51
-
pass
52
50
53
51
defvalidate_content(self):
54
52
"""Validate the paths."""
@@ -74,11 +72,11 @@ def _save_documents(self):
74
72
else:
75
73
raiseValueError("No storage found to save documents.")
0 commit comments