Files
langchain-python/langchain
Tom Bocklisch 47c3221fda Max marginal relecance search fails if there are not enough docs (#1117)
Implementation fails if there are not enough documents. Added the same
check as used for similarity search.

Current implementation raises
```  
File ".venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 160, in max_marginal_relevance_search
    _id = self.index_to_docstore_id[i]
KeyError: -1
```
2023-02-17 15:12:31 -08:00
..
2023-01-15 16:45:16 -08:00
2023-02-17 00:53:16 -08:00
2023-01-14 08:09:25 -08:00
2023-02-12 23:01:26 -08:00
2023-02-12 23:01:26 -08:00
2023-02-15 23:06:48 -08:00
2022-10-24 14:51:15 -07:00
2022-11-12 11:22:32 -08:00
2022-12-18 21:51:23 -05:00
2022-12-06 21:55:02 -08:00
2023-02-09 23:30:18 -08:00
2023-01-19 14:48:30 -08:00