langchain/tests/integration_tests
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
..
agent [test] Add integration_test for PandasAgent (#4056) 2023-05-05 14:49:02 -07:00
cache Harrison/redis cache (#3766) 2023-04-28 20:47:18 -07:00
callbacks add tracing v2 env var (#4465) 2023-05-10 11:08:29 -07:00
chains Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
chat_models Check OpenAI model kwargs (#4366) 2023-05-08 16:37:34 -07:00
document_loaders feat: add loader for open office odt files (#4405) 2023-05-10 01:37:17 -07:00
embeddings Dev2049/hf emb encode kwargs (#3925) 2023-05-01 20:27:41 -07:00
examples feat: add loader for open office odt files (#4405) 2023-05-10 01:37:17 -07:00
llms Check OpenAI model kwargs (#4366) 2023-05-08 16:37:34 -07:00
memory mongodb support for chat history (#4266) 2023-05-08 08:34:05 -07:00
prompts Cleanup integration test dir (#3308) 2023-04-21 09:44:09 -07:00
retrievers Add azure cognitive search retriever (#4467) 2023-05-10 15:27:27 -07:00
utilities added Wikipedia document loader (#4141) 2023-05-06 09:32:45 -07:00
vectorstores parameterized distance metrics; lint; format; tests (#4375) 2023-05-11 00:20:01 -07:00
__init__.py initial commit 2022-10-24 14:51:15 -07:00
.env.example Change in method name for creating an issue on JIRA (#3307) 2023-04-21 13:01:33 -07:00
conftest.py feat: improve pinecone tests (#2806) 2023-04-13 21:49:31 -07:00
test_document_transformers.py Contextual compression retriever (#2915) 2023-04-20 17:01:14 -07:00
test_nlp_text_splitters.py OptimizedPrompt -- k-shot example choice backed by semantic search (#91) 2022-11-09 21:15:42 -08:00
test_pdf_pagesplitter.py cleanup: unify 3 different pdf loaders, rename PagedPDFSplitter (#1615) 2023-03-13 23:06:50 -07:00
test_schema.py Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
test_text_splitter.py Fix TextSplitter.from_tiktoken(#4361) 2023-05-08 16:36:38 -07:00