langchain_aws_utilities_utils.DistanceStrategy

class langchain_aws_utilities_utils.DistanceStrategy(value)[source]

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

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

使用 DistanceStrategy 的示例