距离策略#

class langchain_weaviate.utils.DistanceStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[来源]#

用于计算向量之间距离的距离策略的枚举器。

EUCLIDEAN_DISTANCE = 'EUCLIDEAN_DISTANCE'#
MAX_INNER_PRODUCT = 'MAX_INNER_PRODUCT'#
DOT_PRODUCT = 'DOT_PRODUCT'#
JACCARD = 'JACCARD'#
COSINE = 'COSINE'#

使用 DistanceStrategy 的示例