[docs]definduce_schema_view(self)->SchemaView:logger.info(f"Inducing schema view for {self.handle}")sb=SchemaBuilder()schema=sb.schemaforcollection_nameinself.client.list_collections():sb.add_class(collection_name)chroma_collection=self.client.get_collection(collection_name)sample_doc=chroma_collection.peek(1)ifsample_doc:forfield,valueinsample_doc[0].items():iffield=="_id":continuesd=SlotDefinition(field)ifisinstance(value,list):sd.multivalued=Trueifisinstance(value,dict):sd.inlined=Truesb.schema.classes[collection_name].attributes[sd.name]=sdsb.add_defaults()forcls_nameinschema.classes:ifcls_nameinself.metadata.collections:collection_metadata=self.metadata.collections[cls_name]ifcollection_metadata.attributes:delschema.classes[cls_name]cls=ClassDefinition(name=collection_metadata.type,attributes=collection_metadata.attributes)schema.classes[cls.name]=clsreturnSchemaView(schema)