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

Hierarchy

  • MemoryVectorStoreArgs

Properties

Properties

similarity?: ((a, b) => 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

Generated using TypeDoc