google/generativeai/types/retriever_types.py [429:443]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        updates = flatten_update_paths(updates)
        # At this time, only `display_name` can be updated
        for item in updates:
            if item != "display_name":
                raise ValueError(
                    "Invalid operation: Currently, only the 'display_name' attribute can be updated for a 'Corpus'."
                )
        field_mask = field_mask_pb2.FieldMask()

        for path in updates.keys():
            field_mask.paths.append(path)
        for path, value in updates.items():
            self._apply_update(path, value)

        request = protos.UpdateCorpusRequest(corpus=self.to_dict(), update_mask=field_mask)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



google/generativeai/types/retriever_types.py [460:474]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        updates = flatten_update_paths(updates)
        # At this time, only `display_name` can be updated
        for item in updates:
            if item != "display_name":
                raise ValueError(
                    "Invalid operation: Currently, only the 'display_name' attribute can be updated for a 'Corpus'."
                )
        field_mask = field_mask_pb2.FieldMask()

        for path in updates.keys():
            field_mask.paths.append(path)
        for path, value in updates.items():
            self._apply_update(path, value)

        request = protos.UpdateCorpusRequest(corpus=self.to_dict(), update_mask=field_mask)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



