MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / _fetch_data

Method _fetch_data

eval_code/recons/models/moge/utils/webfile.py:23–27  ·  view source on GitHub ↗
(self, offset: int, n: int)

Source from the content-addressed store, hash-verified

21 return int(content_length)
22
23 def _fetch_data(self, offset: int, n: int) -> bytes:
24 headers = {"Range": f"bytes={offset}-{min(offset + n - 1, self.size)}"}
25 response = self.session.get(self.url, headers=headers)
26 response.raise_for_status()
27 return response.content
28
29 def seekable(self) -> bool:
30 return True

Callers 1

readMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected