From 1c1a1e8935a5e003a88d2710e4a92f74cc7a0b75 Mon Sep 17 00:00:00 2001 From: Aayush Kataria Date: Fri, 1 Nov 2024 05:56:52 -0700 Subject: [PATCH] Fixing merge conflicts --- .../vectorstores/azure_cosmos_db_no_sql.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py b/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py index ed8e65cf88..7baa51a17a 100644 --- a/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py +++ b/libs/community/langchain_community/vectorstores/azure_cosmos_db_no_sql.py @@ -122,8 +122,8 @@ class AzureCosmosDBNoSqlVectorSearch(VectorStore): ) self._embedding_key = self._vector_embedding_policy["vectorEmbeddings"][0][ - "path" - ][1:] + "path" + ][1:] def add_texts( self, @@ -317,15 +317,15 @@ class AzureCosmosDBNoSqlVectorSearch(VectorStore): query += "TOP @limit " query += ( - "c.id, c[@embeddingKey], c.text, c.metadata, " - "VectorDistance(c[@embeddingKey], @embeddings) AS SimilarityScore FROM c" + "c.id, c.{}, c.text, c.metadata, " + "VectorDistance(c.@embeddingKey, @embeddings) AS SimilarityScore FROM c" ) # Add where_clause if specified if pre_filter is not None and pre_filter.get("where_clause") is not None: query += " {}".format(pre_filter["where_clause"]) - query += " ORDER BY VectorDistance(c[@embeddingKey], @embeddings)" + query += " ORDER BY VectorDistance(c.@embeddingKey, @embeddings)" # Add limit_offset_clause if specified if pre_filter is not None and pre_filter.get("limit_offset_clause") is not None: