From df8e35fd8121d935c5f2e8ca1269de2eeed942a0 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski <2348618+obi1kenobi@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:01:02 -0400 Subject: [PATCH] Remove incorrect ABC from two Elasticsearch classes. (#9470) Neither is an ABC because their own example code instantiates them directly. --- .../langchain/vectorstores/elastic_vector_search.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/langchain/langchain/vectorstores/elastic_vector_search.py b/libs/langchain/langchain/vectorstores/elastic_vector_search.py index b77743012..f3b8c37e0 100644 --- a/libs/langchain/langchain/vectorstores/elastic_vector_search.py +++ b/libs/langchain/langchain/vectorstores/elastic_vector_search.py @@ -3,7 +3,6 @@ from __future__ import annotations import uuid import warnings -from abc import ABC from typing import ( TYPE_CHECKING, Any, @@ -53,7 +52,7 @@ def _default_script_query(query_vector: List[float], filter: Optional[dict]) -> @deprecated("0.0.265", alternative="ElasticsearchStore class.", pending=True) -class ElasticVectorSearch(VectorStore, ABC): +class ElasticVectorSearch(VectorStore): """Wrapper around Elasticsearch as a vector database. To connect to an Elasticsearch instance that does not require @@ -340,7 +339,7 @@ class ElasticVectorSearch(VectorStore, ABC): self.client.delete(index=self.index_name, id=id) -class ElasticKnnSearch(VectorStore, ABC): +class ElasticKnnSearch(VectorStore): """ ElasticKnnSearch is a class for performing k-nearest neighbor (k-NN) searches on text data using Elasticsearch.