not (comp_be1.to_numpy(value1) ==comp_be2.to_numpy(value2))
.all()
.item()
):
returnFalse
else:
ifvalue1!=value2:
returnFalse
returnTrue
def__ne__(self, other) ->bool:
returnnot (self==other)
def_docarray_to_json_compatible(self) ->Dict:
"""
Convert itself into a json compatible object
:return: A dictionary of the BaseDoc object
"""
returnself.dict()
def_exclude_doclist(
self, exclude: ExcludeType
) ->Tuple[ExcludeType, ExcludeType, List[str]]:
"""
This function exclude the doclist field from the list. It is used in the model dump function because we give a special treatment to DocList during seriliaztion and therefore we want pydantic to ignore this field and let us handle it.
https://docs.pydantic.dev/usage/models/) and can be used in a similar way.
"""
id: Optional[ID] =Field(
description='The ID of the BaseDoc. This is useful for indexing in vector stores. If not set by user, it will automatically be assigned a random value',