MCPcopy Create free account
hub / github.com/Tencent/digitalhuman / write_file

Method write_file

SWF/src/base.py:213–217  ·  view source on GitHub ↗
(self,
        idx,
        messages
    )

Source from the content-addressed store, hash-verified

211 return f'{self.prefix}_{idx}.json'
212
213 def write_file(self,
214 idx,
215 messages
216 ):
217 json.dump(messages, open(os.path.join(self.output_dir, self.get_file(idx)), 'w'), indent=4)
218
219 def inference_from_resume(self, data, key) -> List:
220 cache =[json.load(os.path.join(self.output_dir, file)) for file in os.listdir(self.output_dir) if file.endswith('.json')]

Callers 2

_runFunction · 0.80
baseline.pyFile · 0.80

Calls 2

get_fileMethod · 0.95
dumpMethod · 0.45

Tested by

no test coverage detected