MCPcopy Create free account
hub / github.com/Alibaba-NLP/DeepResearch / call

Method call

inference/file_tools/file_parser.py:500–507  ·  view source on GitHub ↗
(self, params: Union[str, dict], **kwargs)

Source from the content-addressed store, hash-verified

498 }
499
500 def call(self, params: Union[str, dict], **kwargs) -> Union[str, list]:
501 params = self._verify_json_format_args(params)
502 file_path = self._prepare_file(params['url'])
503 try:
504 cached = self.db.get(f'{hash_sha256(file_path)}_ori')
505 return self._flatten_result(json.loads(cached))
506 except KeyNotExistsError:
507 return self._flatten_result(self._process_new_file(file_path))
508
509 def _prepare_file(self, path: str) -> str:
510 if is_http_url(path):

Callers

nothing calls this directly

Calls 6

_prepare_fileMethod · 0.95
_flatten_resultMethod · 0.95
_process_new_fileMethod · 0.95
hash_sha256Function · 0.90
getMethod · 0.45

Tested by

no test coverage detected