Interface for the arguments that can be passed to the FakeVectorStore constructor. It includes an optional similarity function.

interface FakeVectorStoreArgs {
    similarity?: ((a: NumberArray, b: NumberArray) => number);
}

Properties

Properties

similarity?: ((a: NumberArray, b: NumberArray) => number)

Type declaration

    • (a, b): number
    • Returns the average of cosine distances between vectors a and b

      Parameters

      • a: NumberArray

        first vector

      • b: NumberArray

        second vector

      Returns number