MCPcopy Create free account
hub / github.com/alibaba/zvec / _replace

Method _replace

python/zvec/model/doc.py:150–157  ·  view source on GitHub ↗
(self, **changes)

Source from the content-addressed store, hash-verified

148 return f"<Doc error during repr: {e}>"
149
150 def _replace(self, **changes):
151 new_tuple = (
152 changes.get("id", self.id),
153 changes.get("score", self.score),
154 changes.get("fields", self.fields.copy() if self.fields else None),
155 changes.get("vectors", self.vectors.copy() if self.vectors else None),
156 )
157 return type(self)._from_tuple(new_tuple)
158
159 @classmethod
160 def _from_tuple(

Callers 3

_from_cpp_docsFunction · 0.80
rerankMethod · 0.80
rerankMethod · 0.80

Calls 4

_from_tupleMethod · 0.80
typeFunction · 0.50
getMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected