[docs]classDocumentChunk(BaseModel):""" A chunk of text representing a contextual unit within the document """text:strchunk:intentities:list[DocumentSentenceEntity]sentences:list[DocumentSentence]relevance:floatsentiment:floatsection_metadata:Optional[list[str]]speaker:Optional[str]# Keeps track of the connection to Bigdata_api:BigdataConnectionProtocoldef__init__(self,**data):super().__init__(**data)if"_api"indata:self._api=data["_api"]@cached_propertydefresolved_speaker(self):ifnotself.speaker:returnNoneby_ids_results=self._api.by_ids(ByIdsRequest.model_validate([{"key":self.speaker,"queryType":QueryType.ENTITY}]))speaker_entity=by_ids_results.root.get(self.speaker)returnspeaker_entity.nameifspeaker_entityelseNone