Files
langchain/tests/integration_tests/vectorstores
Evan Jones f668251948 parameterized distance metrics; lint; format; tests (#4375)
# Parameterize Redis vectorstore index

Redis vectorstore allows for three different distance metrics: `L2`
(flat L2), `COSINE`, and `IP` (inner product). Currently, the
`Redis._create_index` method hard codes the distance metric to COSINE.

I've parameterized this as an argument in the `Redis.from_texts` method
-- pretty simple.

Fixes #4368 

## Before submitting

I've added an integration test showing indexes can be instantiated with
all three values in the `REDIS_DISTANCE_METRICS` literal. An example
notebook seemed overkill here. Normal API documentation would be more
appropriate, but no standards are in place for that yet.

## Who can review?

Not sure who's responsible for the vectorstore module... Maybe @eyurtsev
/ @hwchase17 / @agola11 ?
2023-05-11 00:20:01 -07:00
..
2023-04-26 21:45:03 -07:00
2023-04-16 13:11:30 -07:00
2023-04-05 06:51:32 -07:00
2022-11-19 20:32:45 -08:00
2023-04-16 13:44:04 -07:00
2023-02-26 22:11:38 -08:00
2023-05-01 10:47:15 -07:00
2023-04-27 08:14:36 -07:00
2023-04-22 08:26:19 -07:00
2023-04-22 09:17:38 -07:00
2023-04-28 21:25:33 -07:00
2023-04-26 21:45:03 -07:00
2023-04-22 08:26:19 -07:00