listSegments method
Implementation
Future<DocsFullInfoDto?> listSegments(DocsIdDto docsIdDto) async {
CollectionResult? collectionResult = await _vdb.listSegments(docsIdDto.docsId);
if(collectionResult == null) return null;
List<SegmentInfoDto> segmentInfoDtoList = collectionResult.segmentList.map((segmentInfo)=> SegmentInfoDto(segmentId: segmentInfo.id, text: segmentInfo.text, metadata: segmentInfo.metadata)).toList();
DocsFullInfoDto docsFullInfoDto = DocsFullInfoDto(docsId: collectionResult.name,docsName: collectionResult.docsName, segmentInfoList: segmentInfoDtoList);
return docsFullInfoDto;
}