in src/models/struxgpt_base.py [0:0]
def to_json(self, disp=False):
res = {
'name': self.name, 'sent_range': self.sent_range,
'subaspects': [aspect.to_json(disp=disp) for aspect in self.subaspects]
}
if not disp and self.content is not None:
res['content'] = self.content
if not disp and self.chunks is not None:
res['chunks'] = self.chunks
return res