MCPcopy Create free account
hub / github.com/feast-dev/feast / _load

Method _load

sdk/python/feast/chunker.py:106–114  ·  view source on GitHub ↗
(self, source: Any)

Source from the content-addressed store, hash-verified

104 return self._chunk_by_words(text, source_id, source_column)
105
106 def _load(self, source: Any) -> str:
107 from pathlib import Path
108
109 if isinstance(source, Path) and source.exists():
110 return Path(source).read_text()
111 if isinstance(source, str):
112 if source.endswith(".txt") and Path(source).exists():
113 return Path(source).read_text()
114 return str(source)
115
116 def _chunk_by_words(
117 self, text: str, source_id: str, source_column: str

Callers 1

load_parse_and_chunkMethod · 0.95

Calls 1

read_textMethod · 0.45

Tested by

no test coverage detected