MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / _save_to_file

Method _save_to_file

examples/analysis.py:146–152  ·  view source on GitHub ↗

Save current results to JSON file.

(self)

Source from the content-addressed store, hash-verified

144 self._save_to_file()
145
146 def _save_to_file(self):
147 """Save current results to JSON file."""
148 try:
149 with open(self.filepath, 'w', encoding='utf-8') as f:
150 json.dump(self.results_data, f, indent=2, ensure_ascii=False)
151 except Exception as e:
152 logger.error(f"Failed to save results to {self.filepath}: {e}")
153
154 def get_file_path(self) -> str:
155 """Get the path to the results file."""

Callers 2

__init__Method · 0.95
add_task_resultMethod · 0.95

Calls 2

dumpMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected