From 6816ad9addf8c04a1ff00905dd87a2445dadb236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Barrachina=20Guti=C3=A9rrez?= <1333901+ntkog@users.noreply.github.com> Date: Sun, 15 Sep 2024 20:35:36 +0200 Subject: [PATCH] Update docstring in base.py in MilvusVectorStore adding COSINE as available similarity metric (#16031) Update docstring in base.py adding COSINE as similarity metric available According to Milvus Documentation, **COSINE** as similarity metric is supported (Both Milvus and Milvus Lite) but in Llama-Index docs was missing. [Link to Milvus official docs](https://milvus.io/docs/metric.md?tab=floating#Similarity-Metrics) I've checked in the [code](https://github.com/run-llama/llama_index/blob/723c2533ed4b7b43b7d814c89af1838f0f1994c2/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py#L256) , so indeed COSINE is supported, so no more further changes are needed. --- .../llama_index/vector_stores/milvus/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py b/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py index a8cba8db5706a..6efcb97a5d01e 100644 --- a/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py +++ b/llama-index-integrations/vector_stores/llama-index-vector-stores-milvus/llama_index/vector_stores/milvus/base.py @@ -112,7 +112,7 @@ class MilvusVectorStore(BasePydanticVectorStore): doc_id_field (str, optional): The name of the doc_id field for the collection, defaults to DEFAULT_DOC_ID_KEY. similarity_metric (str, optional): The similarity metric to use, - currently supports IP and L2. + currently supports IP, COSINE and L2. consistency_level (str, optional): Which consistency level to use for a newly created collection. Defaults to "Session". overwrite (bool, optional): Whether to overwrite existing collection with same