Skip to content

The agent engineering platform.

Remove extra base model (#7213)

Nuno Campos26409b01bde2
diff --git a/langchain/vectorstores/azuresearch.py b/langchain/vectorstores/azuresearch.py
index 2404d31431..2fe4c50b1c 100644
--- a/langchain/vectorstores/azuresearch.py
+++ b/langchain/vectorstores/azuresearch.py
@@ -18,7 +18,7 @@ from typing import (
)
import numpy as np
-from pydantic import BaseModel, root_validator
+from pydantic import root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@@ -475,7 +475,7 @@ class AzureSearch(VectorStore):
return azure_search
-class AzureSearchVectorStoreRetriever(BaseRetriever, BaseModel):
+class AzureSearchVectorStoreRetriever(BaseRetriever):
vectorstore: AzureSearch
search_type: str = "hybrid"
k: int = 4
diff --git a/langchain/vectorstores/base.py b/langchain/vectorstores/base.py
index 563493d695..346108617d 100644
--- a/langchain/vectorstores/base.py
+++ b/langchain/vectorstores/base.py
@@ -19,7 +19,7 @@ from typing import (
TypeVar,
)
-from pydantic import BaseModel, Field, root_validator
+from pydantic import Field, root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@@ -373,7 +373,7 @@ class VectorStore(ABC):
return VectorStoreRetriever(vectorstore=self, **kwargs)
-class VectorStoreRetriever(BaseRetriever, BaseModel):
+class VectorStoreRetriever(BaseRetriever):
vectorstore: VectorStore
search_type: str = "similarity"
search_kwargs: dict = Field(default_factory=dict)
diff --git a/langchain/vectorstores/redis.py b/langchain/vectorstores/redis.py
index 57e737d215..20eecf7ee2 100644
--- a/langchain/vectorstores/redis.py
+++ b/langchain/vectorstores/redis.py
@@ -20,7 +20,7 @@ from typing import (
)
import numpy as np
-from pydantic import BaseModel, root_validator
+from pydantic import root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@@ -599,7 +599,7 @@ class Redis(VectorStore):
return RedisVectorStoreRetriever(vectorstore=self, **kwargs)
-class RedisVectorStoreRetriever(VectorStoreRetriever, BaseModel):
+class RedisVectorStoreRetriever(VectorStoreRetriever):
vectorstore: Redis
search_type: str = "similarity"
k: int = 4